remove -> woocommerce_after_shop_loop_item
-
hi ,
I can’t remove the woocommerce_template_loop_add_to_cart action , i need to change the button add cart for specifique product
is there a solution
thank’s
Hello,
Could you please describe with some screenshots how you want to change the button for a specific product? So I will try to find a better solution for that.
Looking forward to collaborating with you!
Kind Regards
depending on the sku code, I can know if the product is a drug or not, if it is a drug, the “add to cart” button must be transformed into “find out more”
the fonction
remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 );
http://g-lasante.io
work with the widget but doesn t work with
https://g-lasante.io/categorie-produit/pharmacie-en-ligne/medicament/
Hello,
Enter the below code to the fucntions.php
file in your child theme for removing the “add to cart” button.
if ( ! function_exists( 'wd_remove_add_to_cart_button' ) ) {
function wd_remove_add_to_cart_button() {
remove_action( 'woodmart_add_loop_btn', 'woocommerce_template_loop_add_to_cart', 10 );
}
add_action( 'wp', 'wd_remove_add_to_cart_button', 240 );
}
In the meantime, feel free to ask me any questions you may have.
Kind Regards
same result it doesn’t work …. 🙁 on https://g-lasante.io/boutique/but working on widget on https://g-lasante.io/
Hello,
I have edited the above code, now it should work well. So please replace the old code with the above.
https://gyazo.com/6c9ce931cc4d32f568febd44aae2bff2
Kind Regards
great it’s working thank you
Hello,
We will appreciate it if you can refer your friends or family members to become a part of our Xtemos family.
Wish you all the best.
Kind Regards
The topic ‘remove -> woocommerce_after_shop_loop_item’ is closed to new replies.