The SUMO suite of plugins by FantasticPlugins is a seemingly-elegant solution for creating subscription-based membership products. Their trifecta of plugins, SUMO Memberships, SUMO Subscriptions, and SUMO WooCommerce Dynamic Pricing Discounts together can make it a breeze to create subscription-style products that assign users to “Membership” roles, which can then qualify them for discounts across some or all products in the store.
But, beware: as of this writing, there is a critical bug in SUMO WooCommerce Dynamic Pricing Discounts that makes all shop products free. Meaning, everyone who visits the shop will be able to order every product for free, with no apparent limitation.
What Exactly is the Bug in SUMO Discounts that Makes All Shop Products Free?
This bug can be triggered by enabling SUMO Memberships from within the plugin’s settings. From the General Settings menu on the main Settings page in your WordPress Dashboard, there are a series of checkboxes which enable various discount parameters, such as User Role and Specific Product discounts.
When you enable the “SUMO Memberships” function via this checkbox, and save your changes, the entire store’s products’ prices will be reduced to 0 dollars, and customers will be able to “purchase” everything for free. Obviously, this is a massive problem for development, and teams should act very carefully when working with the current version of SUMO WooCommerce Dynamic Pricing Discounts.
This Bug Occurs Even Without Setting Discount Rules
This bug will occur irrespective of your Discount Rules. Even without having created any SUMO Membership discount rules, which can be found under the SUMO Membership tab in the plugin’s settings menu, the error will persist, simply for enabling the SUMO Membership function.
For this reason, we recommend not enabling this feature at all, except for within controlled development environments and for testing purposes.
SUMO Memberships Setting is Deprecated in SUMO Discounts
As of this writing, the SUMO Members settings menu is deprecated, and should not be used. There is no indication of this in the General Settings menu of this plugin, which is where this critical error can be triggered, nor is there mention of this in the version of the documentation included with the plugin at the time of this writing. The clue about what is going wrong can be found within the SUMO Members settings tab.
At the top of the SUMO Memberships settings tab, there is an alert which tells us that this section is deprecated, and will be removed in a future update. Underneath, it tells us that SUMO Memberships can still be used, but within this tab, the plugin does not specify where or how to go about doing this.
When we visit the User Roles tab, we see a similar alert, informing us that this feature is deprecated, and will soon be removed. Under this alert, we can find a hint at the solution, in the alert that tells us to use the Product/Category Discounts menu to enable User Roles. This, as it turns out, is also the new place to enable SUMO Memberships.
Solving the Bug in SUMO Discounts that Makes All Shop Products Free
This issue may be resolved in a future patch by FantasticPlugins, but until then, here is the way to prevent this bug from occurring:
Use Product/Category Discounts
By navigating to the Product/Category Discounts page, we can select the “Users” box, and click the “Selected Users” option. A new menu dropdown will then appear on the next line, which we can click to then select SUMO Memberships.
With this setting enabled, we can select our preferred discount rules and parameters, and click Save Rule to achieve our Membership Discount function.
Safety in WordPress Development: 101
The sheer number of powerful, functional plugins out there is one of the greatest strengths of WordPress website development. However, due to the nature of this massive, collaborative community, it is essential to take steps to prevent unforeseen errors from making their way into production.
Our story today is a prime example of why it is essential to take safety in development seriously. It is common knowledge that applications should not use deprecated code or functionality; it’s a ticking time bomb before it stops working and produces unpredictable errors.
And, even though plugin developers will generally remove deprecated menus and settings in order to prevent these sorts of errors from happening, there is always a chance that bugs will make their way into production. In that case, your safety precautions will make or break you.
Setting Up a Development Environment
One of the most important steps to take in the way of safety and bug-prevention is in creating a proper Development Environment, separate from the live, production site. This ensures that, when developing and testing a new feature, any errors can be contained and resolved from within the controlled environment you’ve created for that very purpose.
When in Doubt, Source it Out
There are pitfalls lurking around certain corners of WordPress web development that are easy to fall into. Seemingly-mundane acts like updating a plugin, even, have the potential to cause massive, breaking changes on a website and, without having taken the proper precautions, the process of resolving these problems can range from a moderate headache, to a severe loss in data and site functionality.
We at 702 Pros offer robust Web Support packages to prevent and resolve bugs making their way into your site. Going it alone with your website’s development and support, without knowing your safety steps, is like flying blind, and web support may seem like an extraneous expense, until the fateful day something goes wrong, and your site loses days, or more, of progress.
Stay tuned for more important WordPress Safety tips from us at 702 Pros, and, until then…