Wednesday, February 25, 2015

WooCommerce Actions and Filters to Manipulate the Cart

Welcome to the second article in the series on Mastering WooCommerce Actions and Filters. In the previous article, even though it was very basic, we covered handling a customer's billing and shipping address as well as what happens when a customer registers through WooCommerce and it sends them to a third party website, like Salesforce.


In this second article, we will manipulate the cart in some clever ways with real world scenarios you may encounter while creating your eCommerce website using WooCommerce.


Adding a Product to the Cart Programatically


Adding a product to the cart programatically only takes one line of code. The only brainstorming you'll be doing is deciding when or why you'll want to do it. We'll talk more about this later in the third part of this article, when we work on our real world scenario.


All it takes to add a product to the cart is the following:


Continue reading %WooCommerce Actions and Filters to Manipulate the Cart%




by Yojance Rabelo via SitePoint

No comments:

Post a Comment