CODATCODAT
RegisterLogin
ShopifyWWordPress
Install in 5 minutes

Add the Codat widget
to your WordPress store

No technical knowledge needed. Follow the steps below and the widget appears automatically on all WooCommerce product pages.

WooCommerce — Pagina de produs
299 lei
Product verified before sale
View report
Check yours too
1

Install the Code Snippets plugin

In the WordPress admin, go to Plugins → Add New, search for Code Snippets and click Install Now, then Activate.

WordPress Admin — Plugins → Add New
Dashboard
Posts
Products
Plugins
Appearance
Search: "Code Snippets"
CS
Code Snippets
by Shea Bunge, free
Install Now

The Code Snippets plugin is free and has over 1 million active installs. It's the safest way to add code without modifying your theme files.

2

Add a new snippet

Go to Snippets → Add New. Give it a title (e.g. Widget Codat) and copy the code below into the code box:

PHP
add_action('woocommerce_single_product_summary', 'codat_widget', 25);

function codat_widget() {
  $report_url = get_post_meta(get_the_ID(), 'codat_report_url', true);
  ?>
  <div id="codat-widget"></div>
  <script
    src="https://codat.ro/embed/widget.js"
    data-product="<?php echo esc_attr(get_the_title()); ?>"
    data-report-url="<?php echo esc_attr($report_url); ?>"
    data-container="#codat-widget">
  </script>
  <?php
}
Snippets → Add New
Dashboard
Products
Plugins
Snippets
Appearance
Snippet title: Widget Codat
add_action('woocommerce_single...', 'codat_widget');
function codat_widget() { ... }
3

Set to Frontend and save

On the same page, further down you'll find the Where to run section. Select Run on frontend only, then click Save & Activate.

Code Snippets — Setari
Where should this snippet run?
Run everywhere
Run on frontend only
Run on admin only
Save & Activate

After saving, open any WooCommerce product page and the widget should appear right away.

4

Add the verification report link

Optional

If a product has been verified on Codat.ro, you can display the report directly on its page. The widget will show the green card with the "View report" button. If you don't have any verified products yet, you can skip this step.

4A: one time only

Enable Custom Fields on the product

Open any product from Products → Edit. In the top-right corner, click Screen Options and check Custom Fields. Save the product once for the section to appear.

This setting only needs to be enabled once. After that, it appears on all products.

4B: on each verified product

Add the report link to the product

On the product page, scroll down to the Custom Fields section. Add a new field with:

Namecodat_report_url
Valuehttps://codat.ro/report/abc123

Click Add Custom Field and save the product.

The report link looks like this: https://codat.ro/report/..., you receive it after verification.

Done! Here's how it looks on verified products

WooCommerce — Pagina de produs
299 lei
Product verified before sale
View report
Check yours too

Automatically detected devices

The widget appears automatically if the product title contains one of these words:

iphonesamsungipadmacbookapple watchxiaomihuaweionepluspixelgalaxyredmirealmeoppovivomotorolanokiasony xperiaasus rog

Need help?

We'll help you with the integration, completely free.

contact@codat.ro

Still not convinced?
Ask an AI about us.

ChatGPTGeminiDuck AI

Codat.pro

Resources

  • PRO Portal
  • Pricing
  • Request PRO access
  • Integrations
  • Frequently Asked Questions

Company

  • About us
  • Contact
  • For individuals

Legal

  • Terms and conditions
  • Privacy
  • Cookies

Website operated by

FIXLY TECHNOLOGY SRLcontact@codat.ro
Tax ID: 47040460Registration No: J2022000789071
Calea Națională 37A, Botoșani, România
Alternative dispute resolution, ANPC
RefundsData usageData deletion

© codat.pro · All rights reserved