WooCommerce – Allow only one product in Cart

This snippet can be used for many ways. For instance, your store only allows to buy one product at a time such as “Buy Now”. Open functions.php under your activated theme and put the code below: // Only one product in cart add_filter( ‘woocommerce_add_cart_item_data’, ‘only_one_product_in_cart’ ); function only_one_product_in_cart( $cart_item_data ) { global $woocommerce; $woocommerce->cart->empty_cart(); return[…]

WooCommerce – How to change “Add to cart” button text, Tips & Tricks

I’d like to share how to change “Add to cart” text of the WooCommerce. Change the add to cart text on product archives Add the following to your functions.php file under your activated theme. WooCommerce <2.1 WooCommerce 2.1+ Change the add to cart text on single product pages Add the following to your functions.php file[…]