Live Coding a “Deal of the Week” Functionality For WooCommerce

I’ve always wanted to set up an automatic promotion on a different Woo product each week. Let’s code it together?

Hosted by Rodolfo Melogli

Masterclass overview

My WooCommerce website sells plugins, courses, memberships, sponsorships. Except for Black Friday, however, I tend not to run any other promotions during the year because I have no time.

My idea is to automate this.

What I want is to automatically discount a specific product each week (50% off), and create a WP page where this product is automatically displayed with its slashed price. In this way I can have a perennial “Deal of the Week” page link in my navigation bar, and get people to talk about it.

In this class, therefore, we will first figure out how to programmatically discount a Woo product. After that, based on an array of product IDs, we will create a function that will run each Monday and set the sale price for a specific product and a sale expiration date. Finally, we will create the WordPress page and dynamically embed the product on sale.

Class Recording

What you’ll learn

How to discount a product via PHP
How to run PHP every Monday
How to dynamically display our product on sale on a custom WP page

Requirements

Basic knowledge of PHP and WordPress hooks

Upcoming masterclasses

Available recordings

1 2

2 thoughts on “Live Coding a “Deal of the Week” Functionality For WooCommerce

  1. I have a question prepared for the upcoming Q&A session. I’m interested in understanding if there’s a straightforward method to comply with the EU Omnibus Directive, which mandates displaying information below the price tags of products on sale. Specifically, I’m curious about how to show the lowest price of a product in the past 30 days since it went on sale. Your insights on this would be greatly appreciated, as it would help us ensure we are meeting these requirements effectively. Thank you in advance for addressing this query.

    1. That’s a very good question and I’m sure I will address this in the Q&A (now that I think of this, submitting questions before the event is actually a great idea). Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *