Nicola Mustone

Support Lead @ Automattic


Leadership, web, programming. Short essays and hands-on guides, focused on results, not hype.


PHP

Short PHP snippets and examples that make development easier.

  • In the past, we discussed how to change the Return to Shop button URL in the Empty Cart page. Today, we will learn how to change the Continue Shopping button URL on the cart page to redirect wherever you want.

    This button appears when the option Redirect to the cart page after successful addition is selected in WooCommerce > Settings > Products > General > Shop pages > Add to cart behaviour.

    Read more →

  • Cross-sells and Up-sells in WooCommerce are a very powerful tool to give suggestions to your customers.

    You might know that most people who buy product X will probably need product Y as well, and you want the customer to know that. How do you do it? You use cross-sells and up-sells.

    Read more →

  • Do you still have hundreds of expired coupons sitting in your database?

    If you’re giving discounts to first-time buyers or loyal customers, chances are your store creates coupons automatically. That’s great — everyone loves a discount. But once those coupons expire, WooCommerce doesn’t delete them. They just sit there, taking up space for no reason.

    Let’s fix that.

    Read more →

  • Sometimes you only want customers to buy one thing.

    If you sell digital licenses, event tickets, or one-off bookings, you might need to stop customers from mixing that product with anything else in their cart. Other times, you simply want to prevent them from buying more than one unit of a limited item.

    WooCommerce only supports the second scenario out of the box. To handle both properly, you’ll combine a small built-in option with a short snippet that enforces the single-product rule at checkout.

    Read more →

  • In the dynamic world of e-commerce, product attributes in WooCommerce play a pivotal role.

    By transforming these attributes into clickable links, we open doors to a more intuitive and informative shopping experience.

    Read more →