All posts in Tutorials

Modifying Print Invoices and Packing Lists Templates

When our Print Invoices & Packing Lists rewrite was released, we talked about how customizing templates was modified. The goal of these changes was to make it far easier to modify templates in an upgrade-safe way so that they didn’t have to be overridden for changes to take effect. To that end, a more modular template approach was taken, along with the addition of ample WordPress hooks to allow changes Keep Reading…

Creating WooCommerce Memberships Menus for Members

One of our popular Woo Ideas for Memberships is the ability to create a menu for members. We’d examined this for version one of the plugin, but we weren’t crazy about included a lot of the commonly used menu restrictions in the core plugin, so it wasn’t included at launch. We also know that a lot of memberships sites have role-based menu restrictions in place to begin with, such as Keep Reading…

Setting minimum and maximum input values with Measurement Price Calculator

A frequent question I get from developers using our Measurement Price Calculator plugin is along these lines: Can I set minimum and maximum input values for measurements? At present, this isn’t possible because (1) a UI for measurement attributes would be a bit tough to do on the current product page without being confusing, and (2) the inputs for measurements are currently text fields, not number inputs. The reason for Keep Reading…

Limiting Members to One Membership with WooCommerce Memberships

When we built WooCommerce Memberships, one of the biggest requests we had from our surveys and beta testers was to build a plugin that would allow customers to have as many memberships as they wanted to purchase. This became one of the major decisions we made in the initial version, and any customer can have 0 or more memberships. However, some shops want to limit the number of memberships a Keep Reading…

WooCommerce Class Members Example: Create a WooCommerce Upsell Shortcode

This is post 7 of 8 in the series “Build a WooCommerce Extension” When building your first WooCommerce plugins, it’s a good idea to look at other extensions or WooCommerce core itself for ideas. You’ll notice that many of them take an OOP (object-oriented programming) approach. Rather than being composed solely of functions that take in data, use some logic to manipulate the data, then output data, the code focuses Keep Reading…

Moving WooCommerce Upsells on Product Pages

Your WooCommerce products can have upsells assigned to them so that you can encourage customers to buy different versions or more expensive products while visiting your product page. You can add these under Product Data > Linked Products while editing a product, and the upsells will be shown at the end of your product description. However, most times this is at the bottom of your product page. What if customers Keep Reading…

Create a “My Memberships” section shortcode with WooCommerce Memberships

Today’s question comes from Scott: Can I use or create a shortcode to have the “My Memberships” area outside of the “My Account” page? In other words, if I wanted to place My Memberships on a page other than the default /my-account page, would I be able to do that? This is an interesting question, as you could add the “My Memberships” table to a custom page on your site, Keep Reading…

Add WooCommerce Email Recipients Conditionally

This comes from an interesting question we got from Helmar: Is it possible to send an “order received” email to a second recipient only if the order contained a tangible product? Background: If I receive orders with tangible products, my shipping company gets a CC of that order in order to fulfill it. If the order contained no tangible product, there’s no need for them to receive a copy of Keep Reading…

Add a custom Member Area section in WooCommerce Memberships

WooCommerce Memberships 1.5 has been recently released. This release consisted of a compatibility release that added support for WooCommerce 2.5, and also included a number of minor tweaks and bug fixes (see here for the complete Memberships changelog). Soon we will begin work on the next release to introduce new features! Meanwhile, here’s another post about the Member Area, a feature introduced in Memberships 1.4 early last December. This component creates Keep Reading…

WooCommerce Memberships: Check for any active membership

WooCommerce Memberships is designed to allow stores to have as many membership plans as desired, and in turn lets you allow customers to have more than one membership. The plugin has conditional checks that allow you determine if a customer / user is an active member of a particular plan, as this only requires the plan ID or slug. However, checking to see if a customer / user is an Keep Reading…