How can I disable a “view cart” btn until after a product is added to the cart?
-
I have added a function that adds a “view cart” button next to the “add to cart” button. I would like the button to be disabled (either not showing or greyed out) until someone adds the product to the cart.
Here is my function:
function action_woocommerce_after_add_to_cart_button() { echo '<div class="woocommerce-message krank-mesg" role="alert"><a href="./cart/" class="button wc-forward">VIEW CART</a> <p class"woo-fx-added"><span>The New Formula X Driver</span> has been added to your cart.</p></div>'; add_action( 'woocommerce_after_add_to_cart_button', 'action_woocommerce_after_add_to_cart_button', 10, 0 );
thanks in advance for any help,
GregThe page I need help with: [log in to see the link]
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How can I disable a “view cart” btn until after a product is added to the cart?’ is closed to new replies.