Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wearo.io/llms.txt

Use this file to discover all available pages before exploring further.

Install on WooCommerce

Prerequisites

  • A Wearo account (sign up)
  • Your Wearo API key (get yours)
  • Admin access to your WordPress installation
1

Choose your insertion method

Pick one of these two options:Option A — Plugin (recommended, no code): Install a free plugin like Insert Headers and Footers. Go to Settings → Insert Headers and Footers and paste the snippet in the Footer section.Option B — Edit functions.php: In your theme’s functions.php, add:
function wearo_widget_script() {
    if ( is_product() ) {
        echo '<script src="https://wearo.io/widget/tryon-widget.js"></script>';
        echo '<script>TryOnWidget.init({ apiKey: "wearo_xxx", productSelector: ".woocommerce-product-gallery__image img" });</script>';
    }
}
add_action( 'wp_footer', 'wearo_widget_script' );
2

Add the snippet

<script src="https://wearo.io/widget/tryon-widget.js"></script>
<script>
  TryOnWidget.init({
    apiKey: 'wearo_xxxxxxxxxxxxxxxxxxxx',
    productSelector: '.woocommerce-product-gallery__image img',
    brandColor: '#000000'
  });
</script>
Replace wearo_xxx... with your API key.
3

Verify it works

Visit a product page. You should see the “Try it on” button on your main product gallery image.

Troubleshooting

WooCommerce gallery plugins (like WooGallery or Variation Swatches) sometimes replace the default selector. Try:
productSelector: '.woocommerce-product-gallery__wrapper img:first-child'

Need help?

Book a 30-min integration call

We’ll review your store and set up Wearo live with you.