Add Product to Cart Programmatically
In this tutorial I will show you some simple PHP code examples which allow to add a product or a product variation to the cart in WooCommerce.
WooCommerce is my favourite eCommerce solution since WooThemes joined Automattic.
In this tutorial I will show you some simple PHP code examples which allow to add a product or a product variation to the cart in WooCommerce.
It is the last tutorial about WooCommerce product tabs, let me show how to change the content of the default product tabs or add something custom there.
In this tutorial you will learn not only how to create a custom tab on WooCommerce single product pages but also how to display it only for specific product types or products.
Let’s figure out how to set your custom order for product tabs on single product pages and how to select a tab you want to be opened by default.
Why do you think I decided to create a separate tutorial about renaming product tabs? 🤔 Because everything is not as simple as it seems, especially when we are talking about the Reviews tab.
In this tutorial I will show you different ways how you can hide any of default tabs on single product pages. Without plugins and CSS of course 👍
It is just a tiny thing but sometimes it can confuse your website customers. Because by default when you change the product quantity in WooCommerce cart, the cart won’t be updated until you smash the Update cart button.
WooCommerce has 4 different filter hooks which allow to manage the address fields, let’s figure out when and how to use each of them.
In this tutorial we will add an input field into the registration form and configure a custom validation for it. Without plugins or changing WooCommerce templates 🙌
First of all we will make one of the edit account default fields optional, then we are going to remove it completely and after that I will show how to add a custom field there.
Different ways how you can completely hide Add to cart buttons on specific pages of your store without any CSS or plugins.
In the previous tutorial I showed you how to hide product prices, now let’s continue with the same idea of transforming a WooCommerce store into a catalog and disable purchasing products. Without plugins.
In this tutorial I will show how to check in the code if a current product in the loop or a product with a certain ID belongs to specific product categories or tags.
In this tutorial I will show you two ways how to check if currently displayed page is a product category. We will also try to detect categories with certain IDs, slugs and names.