Anddressfor Brands
WooCommerce & WordPress Hook Integration

AI Virtual Try-On for WooCommerce Stores

Add AI virtual try-on to any WordPress WooCommerce store. Zero heavy backend plugins overloading your server: just a clean, lightweight client Web Component.

Zero PHP Overhead

Zero CPU or memory consumed on your WordPress server. All GPU inference is handled by Anddress infrastructure.

Native WooCommerce Hooks

Hooks natively into standard action points like woocommerce_after_add_to_cart_button without modifying core templates.

Page Builders Ready

Works seamlessly inside Elementor Pro Single Product templates, Divi Builder, or Gutenberg product blocks with isolated Shadow DOM.

Official WordPress & WooCommerce Plugin

1-Click Installation from your WordPress Admin

Download the ZIP file and upload via Plugins > Add New > Upload Plugin. Enter your Public Key and the fitting room will activate on all product pages.

Download Plugin (.zip)
functions.php

Add this snippet to your child theme

wp-content/themes/child-theme/functions.php:
// 1. Anddress loader (~5 KB)
add_action('wp_footer', function() {
    echo '<script src="https://app.anddress.com/widget/anddress-loader.js" data-brand-key="pk_live_..." async></script>';
});

// 2. Try-on button on the WooCommerce product page
add_action('woocommerce_after_add_to_cart_button', function() {
    global $product;
    if (!$product) return;
    $img_id  = $product->get_image_id();
    $img_url = wp_get_attachment_image_url($img_id, 'full');
    ?>
    <div style="margin-top: 14px;">
      <anddress-tryon-button
        data-garment-image="<?php echo esc_url($img_url); ?>"
        data-garment-category="tops"
        data-garment-id="<?php echo esc_attr($product->get_sku() ?: $product->get_id()); ?>"
        data-garment-name="<?php echo esc_attr($product->get_name()); ?>">
      </anddress-tryon-button>
    </div>
    <?php
});

// 3. Sales attribution on the order-received page
add_action('woocommerce_thankyou', function($order_id) {
    if (!$order_id) return;
    $order = wc_get_order($order_id);
    if (!$order) return;
    ?>
    <script>
      window.Anddress?.trackPurchase({
        orderId: '<?php echo esc_js($order_id); ?>',
        value: <?php echo esc_js($order->get_total()); ?>,
        currency: '<?php echo esc_js($order->get_currency()); ?>'
      });
    </script>
    <?php
});
AI Virtual Try-On for WooCommerce & WordPress — Anddress for Brands