Groups: Remove User Automatically From Registered Group
This is a fix for a bug that came through regarding the automatic addition of the Registered group to users. The client's site depended on users only being a member of a single group. My fix is specific for using WooCommerce…
WooCommerce + Groups: Remove Specific Disallowed Items From Cart
Restrict a list of SKUs from being purchased by a specific group The site uses the Force Sells Extension from WooThemes, but the plugin isn’t required to use the below code. The SKUs listed in the original from below were…
WooCommerce: Add Billing Codes To Checkout & User Profile
We got a request to add a custom field to user profiles allowing multiple codes separated by commas and then add a select containing those codes to the checkout page. These codes were going to be used to add a…
WooCommerce: Only Allow A Single Top-Level Category of Items in the Cart
This code was out of date and doesn't work as displayed with the latest versions of WooCommerce or WordPress.
WooCommerce: Get Top Level Category
Get the id of the top level category for a product no matter what it’s depth in the category tree.
WooCommerce: Only Display Products On Certain Days
This came in from a Stack Overflow question called WooCommerce Link Product Visibility To Day Of Week
WooCommerce: Save Item SKU to Order Item Meta for Historical Reference
February 2022: This code may be out of date. We're not currently scheduled to release any updates or fixes for this and cannot validate that it still works with current versions of WooCommerce.
WooCommerce: How to show empty categories
2022-01-18: There will be no more updates to this solution. 2018-01-30: The solution to this for WooCommerce 3.x+ needs to be updated for screenshots only. WooCommerce moved the product display options to the Customizer under "WooCommerce". I'll be working to…
WordPress + Memcached: How to set it up properly
I use the Memcached Redux plugin on all of the servers and WordPress installs that I manage. I want to share the proper way to get your WordPress and Debian server setup to utilize Memcached. This guide will also set your…