WooCommerce

Clear cart before adding a product to cart.

Add to funtions.php // Empty cart when product is added to cart, so we can't have multiple products in cart add_action( 'woocommerce_add_cart_item_data', function( $cart_item_data ) { wc_empty_cart(); return $cart_item_data; } );

WooCommerce Add to Cart Redirect Issue when Duplicate Item in Cart

It adds a layer to the click event, which first makes an Ajax call to the backend to see if the product is eligible to be added to the cart. In both cases, it redirects you to the cart page with either a success message or an error message jQuery(document).ready(function($) { // Attach the click […]

How to find Merchant ID for Keap Payments to Add to WooCommerce

On the payment method screen in Keap, there's a message at the top of the screen when Keap Payments is the active payment processor. It will look like the app ID, followed by a dash and a number. This number is the merchant ID that needs to be populated in WooCommerce. In the screenshot below, […]

Update PayThen Links for COTBX WooCommerce

File location (for Anthony ) SFTP/or any other file IDE -> /api/process-payment.php row 29 - url for Canada row 31 - url for everywhere else This is a stand-alone file it does not have any dependencies with other files or functions, so if you need to use it elsewhere in the future just create the […]

Elementor Popup Condition Based on Products in Cart

You need to create a function and put it e.g. in your child theme's function.php. I have created a gist with the functions code, please see https://gist.github.com/DigitalFactoryCR/c95e26d10ba920db1caf2f05211da00c Once done that add the following PHP statement in your Conditional: is_in_cart( [ 977,694,693,692,691 ] ) You need to add another function e.g to your child theme: https://gist.github.com/DigitalFactoryCR/827bb567bd77cf4b3fe91e43046edb24 […]