How to Programmatically Create WooCommerce Subscriptions with Payment Methods

During a recent project, I had to programmatically create WooCommerce subscriptions and link them to existing customer payment methods. I learned a lot through the process, and I thought I would share my findings in this comprehensive tutorial. Whether you’re migrating subscriptions from another platform, or building a custom subscription creation process, this guide will… Continue reading How to Programmatically Create WooCommerce Subscriptions with Payment Methods

How to Convert Regular WooCommerce Products to Subscription Products Programmatically

Converting regular WooCommerce products to subscription products can be tricky. Recently, I needed to convert a bunch of products in bulk and ran into some interesting challenges that I’ll share with you along with the solution. Without further ado, let’s see how we can properly convert both simple and variable products to their subscription counterparts.… Continue reading How to Convert Regular WooCommerce Products to Subscription Products Programmatically

Apply WooCommerce coupons to regular prices instead of sale prices

Ever needed to apply WooCommerce coupons to regular prices instead of sale prices? Maybe you want to run a special promotion that should override existing sales, or you need to ensure your percentage-based coupons are calculated from the original product price. Here’s a simple solution that lets you do just that. In my case, I… Continue reading Apply WooCommerce coupons to regular prices instead of sale prices