How to add or remove coupons dynamically based on cart total, on WooCommerce

Imagine the scenario where we have 2 coupons, one (5off) that gives $5 discount to the total client order, as well as a coupon (10off) that gives $10 discount to the total client order.

When the user inserts any of the coupons in, we want the $10 off coupon to apply only if the total order value is over $50, otherwise, we want the $5 coupon to apply instead.

Continue reading “How to add or remove coupons dynamically based on cart total, on WooCommerce”

CF7 to Salesforce integration programatically

In this tutorial, you will learn about how to create leads in Salesforce programmatically, without the use of plugins. This tutorial focuses on integrating Contact Form 7 to SF using the Web-to-Lead method.

The full code can be found at the end of the tutorial.

If you are interested in a different integration please let us know in the comments section.

Continue reading “CF7 to Salesforce integration programatically”

How to hide WooCommerce products from search by category

I found myself in the situation where I had to give the client the possibility to hide some of their products from search, so they can manually send the product urls to their clients. The way I got around it at the time was to create a product category called Hidden and use the snippet below, which you can paste in your theme’s functions.php file.

Continue reading “How to hide WooCommerce products from search by category”