Tagged: woocommerce
hi
reffearing this post : https://kriesi.at/support/topic/add-text-between-quantity-and-add-to-cart-button-product-page/
I need a hook on the code from Yigit, this code is perfect but i need it to display ONLY for 2 products ;
function add_custom_tooltip(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘.single .quantity’).append(‘<span class=”custom-attr”> Meter</span>’);
});
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_tooltip’);
Thanks for your help!
it’s for 2 variable products.this one (see in private)
Very thanks in advance!
If it’s easyer for the hook you can make this snippet work only for products from “example” category.
Hi,
Thanks for the update, maybe you could use one of the WooCommerce conditionals? https://docs.woocommerce.com/document/conditional-tags/
Best regards,
Rikard