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.
Install the Code Snippets plugin
In the WordPress admin, go to Plugins → Add New, search for Code Snippets and click Install Now, then Activate.
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.
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:
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
}function codat_widget() { ... }
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.
After saving, open any WooCommerce product page and the widget should appear right away.
Add the verification report link
OptionalIf 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:
codat_report_urlhttps://codat.ro/report/abc123Click 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
Automatically detected devices
The widget appears automatically if the product title contains one of these words:
Need help?
We'll help you with the integration, completely free.

