All my tutorials about WordPress and WooCommerce. Here you can find articles with and without snippets, written to teach you how to do things properly with WordPress and WooCommerce.

This is the second post of the series WC CLI – WooCommerce via command-line and I’ll show you how to manage your products with WooCommerce CLI.

What can you do with products and WooCommerce CLI? Everything you can do from the editing screen can be done via command-line.

  • Creating products (or importing them from a file)
  • Updating products
  • Deleting products
  • Getting single products
  • Getting all the products together
  • Getting registered product types
  • Getting product categories

Read more

With the current version of WooCommerce, the 2.5, the developers added the support for WC CLI, which means that you can manage your WooCommerce store from the command-line.

If you are familiar with WP-CLI, you know what I’m talking about. If not, keep reading and I’ll show you how deep the rabbit hole goes.

Read more

I already talked about how to add custom CSS to your site. It’s now time to learn how to add custom PHP code as well!

In most of my posts on this website, I tell you to add code to the functions.php file, how should you do it? And what is the best way to do it?

Read more

Even if WooCommerce provides a lot of ways to add custom data to your products, sometimes is just not enough, or no the best way to do it. You may need to add some custom fields that will properly show on your product page.

In this tutorial, you will learn how to create custom fields for your products. I won’t cover how to add custom fields on variations for now, it will be a separate tutorial.

Read more

Adding products to the cart is the first step to convert a user to a customer.
In WooCommerce you can add products to the cart from their details page or from the shop page, for some kind of products, like simple products in example.

But sometimes this is not enough. It would be a lot better to have a landing page featuring the awesome product you just created.
In this case you could use the shortcode [add_to_cart].

But you can also create your own button by using a custom Add to Cart URL. It could be particularly useful when you have a visual builder or a pricing table plugin.

In those cases the Add to Cart shortcode may not work properly, may have styling issues because it could be not compatible with the plugin you are using.

Read more