• Better Subscription Switching – WooCommerce Subscriptions

    This free plugin overrides the grouped product template during a subscription switch so that there is a nice button interface showing the prices and which one is current. Plugin: Better Subscription Switching Buttons A WordPress plugin that improves the subscription switching experience in WooCommerce Subscriptions by providing a cleaner, more intuitive interface for switching between

    Read more …

  • What are Exceptions and RuntimeExceptions in PHP?

    In PHP, Exception handling is a process used to manage errors in a controlled fashion. It was introduced in PHP 5 and it has become a standard practice for handling errors in more modern PHP code. An Exception in PHP is a standard class that can be used to signal that an error has occurred.

    Read more …

  • Free Custom Rules and Actions for AutomateWoo

    I’ve crafted some more free plugins designed to function as mini-extensions for AutomateWoo, an automation powerhouse for WooCommerce sites. AutomateWoo is basically “If This Then That” (IFTTT), but for WooCommerce. It enables store owners to create powerful workflows to automate emails, rewards, etc., and we often use it as a tool to bulk update WooCommerce

    Read more …

  • Add autoupdates to your WordPress plugin that’s hosted on GitHub using update_plugins_{$hostname}

    Synopsis How Since WordPress 5.8, we’ve been able to set the Update URI in the plugin header. Setting that plugin URI allows us to add a filter to modify the update process based on the Update URI. The Code First, you need to add the Update URI to your plugin header, i.e.: Then, add a

    Read more …

  • How To Pause WooCommerce Subscription Renewals

    Synopsis I wrote another free mini-plugin. This one allows a WooCommerce store to pause all WooCommerce Subscription renewals. Use Cases There are times when a WooCommerce store needs to temporarily pause all renewals, such as: In these scenarios, it would be fairly safe to pause renewals temporarily, and unpause them after a certain period of

    Read more …

  • AutomateWoo Order Action Add Free Product

    I wrote a mini-plugin. It extends the functionality of AutomateWoo with a custom action which allows you to add a free product to an order as a line item. Intended use This action is intended for downstream use, such as adding a product to the order after it is created, but before it gets shipped,

    Read more …

  • Add Product Category to email subject WooCommerce

    This snippet will add a new {product_category} placeholder to the email subject for the New Order email in WooCommerce. So, for example, when I go to WooCommerce > settings > email > New Order > “manage”, I can have a subject line like this: [{site_title}]: New order – [{product_category}] #{order_number}

    Read more …

  • Restrict plugin (or all) autoupdates to business hours – WordPress

    We love the plugin autoupdate functionality in WordPress, but we really don’t want them to update on a Saturday night, potentially bringing a site down and messing up our weekend. Update I’ve made this into a downloadable plugin here: https://github.com/a8cteam51/plugin-autoupdate-filter/ When do plugin autoupdates happen? Every time someone hits admin: add_action( ‘admin_init’, ‘_maybe_update_plugins’ ); This function checks if

    Read more …

  • Filter classic WordPress gallery shortcode attributes

    Use Case We ran an automated import from a Tumblr site to a new WordPress site, and all galleries were imported as gallery shortcodes in classic editor blocks, and they all were set to the default 3 columns and showing thumbnail sizes. We wanted to change the gallery settings on those imported galleries to a

    Read more …

  • Export Gifted Subscriptions (WooCommerce)

    Use Case You are trying to export or track which subscriptions have been gifted. Plugins WooCommerce Subscriptions Gifting for WooCommerce Subscriptions WooCommerce Subscriptions Importer and Exporter Snippet Output This will add a new ‘Recipient’ column to your CSV Export, which will include the user ID of the recipient. After importing into Google Sheets or similar,

    Read more …

  • Minimum Subscription Period WooCommerce

    There’s no default way to set a minimum subscription period with WooCommerce Subscriptions, but there are a couple of potential solutions to this: Sign-up fee and free trial Let’s say you want a customer to have to pay a minimum amount, and then go monthly after that, you could set a sign-up fee and free

    Read more …

  • Log PayPal IPN Payload in WooCommerce

    PayPal Standard communicates with your WooCommerce store using IPNs ( and PDT, if you have it set up, but it’s not as common). For the most part, IPNs are still the standard method of sending information back to a WooCommerce store, such as successful charges, subscription renewals, etc. If you want to capture and log

    Read more …

  • Switch between options of same subscription WooCommerce

    Customer use case I have a client that is wanting to set up a subscription where the customer would select a product and it would allow them to select one or more weekdays. The cost of the subscription would be the total of the weekdays selected, and it would be a weekly-recurring order. What I’m

    Read more …

  • Clearing a Clogged Action Scheduler Queue – WooCommerce

    Clear out completed & cancelled actions safely Would you like to clear out the Action Scheduler 3.0+ completed and cancelled actions in a safe way? You can add this filter to your site: add_filter( ‘action_scheduler_retention_period’, function() { return DAY_IN_SECONDS * 14; } ); This will change the scheduled action retention period to 14 days (instead

    Read more …

  • Auto-add free shipping coupon for initial orders only for WooCommerce Subscriptions

    Synopsis Customer wanted to offer free shipping on any orders of at least $25. Additionally, they wanted any subscription renewals to charge shipping normally – the free shipping should only apply to the initial order. To solve this, I’ve suggested using a free shipping coupon, which is applied automatically to the cart if it’s $25

    Read more …

  • Remove Coupons from Cart with Subscriptions

    Remove coupons from cart if there’s a subscription product in it.

    Read more …

  • WooCommerce Subscriptions Restrict Product

    Here’s a mini-plugin I wrote which extends the functionality of WooCommerce Subscriptions. It restricts subscription products to a certain number of total active (unended) subscriptions on a site. Use case: store owner wants products and subscriptions to have a one-to-one relationship, i.e. each product should only be subscribed to once. For example, subscription product is

    Read more …

  • Autocomplete Subscription Renewals WooCommerce

    The default behavior of WooCommerce is to place orders for physical products in the ‘processing’ status. If you would like to auto-complete all orders with successful payments, including subscription renewals, here’s a free mini-plugin which will do that: https://github.com/jrick1229/woocommerce-subscriptions-auto-complete-orders

    Read more …

  • Confirm WooCommerce Subscriptions Cancellation

    We recently witnessed some issues occurring when customers using WooCommerce and Subscriptions deleted their payment methods (when they have a credit card “on file”). When they also have active subscriptions using the card they just deleted, most customers don’t realize that they also have to update their card for each of the active subscriptions. We’ve

    Read more …

  • Logging errors in WooCommerce

    Tracking down errors in PHP can be tricky sometimes, but WordPress and WooCommerce have some built in logging to make it easier. Here are a few snippets for future use: WP_Debug logs First, you need to turn on wp_debug and logging in your wp-config.php file. This will create a debug.log file in your wp-content folder, which

    Read more …

  • the_date() vs. the_time()

    These two WordPress functions can be somewhat confusing, and and for good reason: they are nearly identical, and used in similar locations. Both are used to display the publish date (and time) of the post. How are they different? the_date() the_date() will only display the same date once per page. This is designed to be used

    Read more …

  • Keeping the Web Boring

    There is a lot of temptation to create overly complicated websites. Whether influenced by the client that always wants the page to “pop,” or simply pulled along by the hype train of the latest JavaScript frameworks, it is often too easy to make things unnecessarily complicated. Web developers also tend to be a clever bunch, and

    Read more …

  • Reid Health

    Acted as lead developer on complete redesign and overhaul of hospital website as they transitioned to an umbrella health organization. We used WordPress as a CMS to provide a user-friendly experience for the non-tech-savvy content administrators. Heavy use of custom fields allowed us to provide places for lots of custom editable content while preventing design creep.

    Read more …

  • “It’ll be easy…”

    When a client says, “It should be pretty easy and won’t take long,” it invariably means it will be a lengthy and painful slog through all of the seven levels of Hades.

    Read more …

  • The two states of every programmer

    The two states of every programmer. pic.twitter.com/WU5CZ8EzxR — George Broussard (@georgebsocial) October 10, 2014

    Read more …