Trying to customize wc_add_to_cart_message per taxonomy
-
Hello! I’m trying to have a diferent message that offers “Continue Shopping” affter hitting the “add to cart button” instead of just “view” cart and I want it different for certain tags and categories, to offer different destintations in that “Continue shopping button”.
I’m trying this but it doesn’t work
function woocommrece_custom_add_to_cart_message() { global $woocommerce; if (has_term('jojo-maman', 'pa_marca')) { $message = '<a href="carrito/" class="button wc-forwards" style="margin: 2px 5px;float: left;background: #CA5C5F;">Ver carrito</a><a href="https://127.0.0.1/2016/ab0516" class="button wc-forwards" style="margin: 3px 5px; float: left;">Seguir comprando</a>'; } else { $message = "<span>noe</span>"; } return $message; } add_filter('wc_add_to_cart_message', 'woocommrece_custom_add_to_cart_message');
Any trick would be greatly appreciated… Thanks.
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Trying to customize wc_add_to_cart_message per taxonomy’ is closed to new replies.