Create Products Programmatically

In this tutorial I am going to guide you through the process of creating products in WooCommerce in code.

It is the most correct way of creating products in latest WooCommerce versions. So, please forget about wp_insert_post() and update_post_meta() functions. Yes, I perfectly remember that products are WordPress custom post types and product prices are post meta but it doesn’t allow us to use those functions anyway, because there is a little more than that and it could cause bugs.

In this tutorial we are going to use CRUD objects that were introduced in WooCommerce 3.0 (CRUD is an abbreviation of Create, Read, Update, Delete). The CRUD objects we are interested in right now are:

  • WC_Product_Simple – for simple products,
  • WC_Product_External – for external products,
  • WC_Product_Grouped – for grouped products,
  • WC_Product_Variable – variable ones.

We are also going to use plenty of methods of these objects, that allow us to configure our product data.

Setup Stripe Payments on your Website with Payment Intents

Almost 7 years ago I created a tutorial about Stripe integration on a website. When I created it, it seemed quite difficult to me, but now it looks easy-breezy.

The thing is that it is obsolete right now. Well, it actually works for some cards, but mainly for those cards that are operating in North America. Today our goal is to implement it with brand new Stripe API which is called Payment Intents.

And I am going to guide your through it step by step.

Learning Full Site Editing with Kubrick Block Theme

I was eager to tell you about Full Site Editing, but I didn’t know where to start. It was just overwhelming. But not so far time ago I find out that the very first WordPress theme – “Kubrick” was rebuild for FSE, so, it is a block theme now.

How to Handle Theme Updates from your Custom Server

My tutorial about configuring self-hosted plugin updates became quite popular so I decided to publish a similar tutorial related to WordPress themes.

The whole tutorial consists of two steps – in the first step we are going to configure our custom update server, in the second step – create a theme actually.


Replace WordPress Logo in Gutenberg Fullscreen Mode

First of all let me show you guys what WordPress logo do I mean. You can find it in the top left part of the screen.

Default WordPress logo in Gutenberg fullscreen mode

And here is what we are going to achieve in this tutorial:

How to change WordPress logo in Gutenberg editor fullscreen mode

As you may notice I used a custom photo of me but you may use an SVG icon if you want.

2021 Year in Review

I know that it is already February but I decided that it would be a really good idea to do these annual recaps here, on my blog.