WooCommerce & WordPress Hook Integration
Cabine d'Essayage Virtuelle IA pour Boutiques WooCommerce
Ajoutez la cabine d'essayage virtuelle à votre boutique WooCommerce sans alourdir votre serveur.
Aucune surcharge PHP
Aucune CPU ni mémoire consommée sur votre serveur WordPress. Toute l’inférence GPU tourne sur l’infrastructure Anddress.
Hooks WooCommerce natifs
S’accroche nativement aux points standards comme woocommerce_after_add_to_cart_button, sans modifier les templates du cœur.
Compatible page builders
Fonctionne sans accroc dans les templates Single Product d’Elementor Pro, dans Divi Builder ou les blocs produit de Gutenberg, avec un Shadow DOM isolé.
Extension officielle WordPress et WooCommerce
Installation en 1 clic depuis votre tableau de bord WordPress
Téléchargez le fichier ZIP et installez-le via Extensions > Ajouter > Téléverser une extension. Entrez votre clé publique pour activer.
functions.php
Ajoutez ce snippet à votre thème enfant
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
});