WooCommerce versions prior to 3.0 would allow for the search of customers whose usernames were numeric only. That changed in version 3.0 and if the search is numeric, the search will only search by user id. If you have usernames that are numeric, however, you can hook into the AJAX action before WooCommerce does and use […]
Retrieve Booking Meta Data
Since the introduction of Bookings version 1.10.0 meta data associated with a booking has been removed from WooCommerce orders. This may add a level of frustration, particularly when using some sort of exporter which would have effortlessly fetched the booking data if that data were part of the order line item data. This is an unfortunate side […]
Display WooCommerce Photography Products in Shop
By default, WooCommerce Photography products are not displayed in the WooCommerce shop or any other normal product archives. The idea behind that is that this particular extension is meant for wedding photographers and similar use cases. Suppose, however, that you wish to sell all of your photographs to the public at large. How can this […]
Prevent WooCommerce From Changing WordPress User Display Name
WooCommerce, by default, will change the WordPress display name for any given user to their First Name Last Name when that user makes a purchase through WooCommerce. This probably makes a lot of sense in the interest of customer relationships, but there may be cases where this is undesirable, say in the case of a forum […]
Revert Product Addons Display to 2.7.21 Behavior
Version 2.7.22 of Product Addons changed the way that addons are displayed. This was done because of an issue with variable products which have long variation descriptions not displaying properly. Unfortunately, this has broken other use-cases or at the very least, caused undesirable behavior and display issues. There is a way to revert the display […]
Remove Free Shipping for Non Members
WooCommerce Memberships offers some member perks out of the box and there are more perks that are being discussed here – one of which is free shipping for members. This has not been implemented yet, but it could be achieved via custom code. WooCommerce provides a filter named woocommerce_shipping_zone_shipping_methods which can be used to remove free shipping for non-members. […]
Trim Trailing Zeros in WooCommerce Product Addons Price Display
Perhaps you are using the woocommerce_price_trim_zeros as suggested in this thread: https://wordpress.org/support/topic/about-price-displaying/ and you have noticed that filter has no effect on product addon price displays. This is due to an unresolved issue with the accounting.js library here: https://github.com/openexchangerates/accounting.js/issues/93 There is a workaround, however. The workaround requires a bit of JavaScript trickery to achieve. Fortunately, Product Addons has a […]
WooCommerce Memberships – Hide Product
WooCommerce and many of its extensions are highly customizable. WooCommerce Memberships is certainly included in the list of highly customizable extensions. As an example – suppose a merchant is selling products that grant access to a memberships plan and once a purchase of one of those products has been made, the merchant doesn’t want to show that product […]
Conditionally Hide Gravity Form
Suppose you’re using WooCommerce Gravity Forms Product Add-ons on a variable product but your Gravity Form is really only applicable to one of your variations. How can you conditionally display the form for only the applicable variation? A tiny bit of inspecting the product page and a code snippet can do the trick. The code snippet that […]
Add Northern Ireland to WooCommerce Shipping Zones
WooCommerce, by default, only recognizes countries/regions which are listed in the ISO 3166 standard. The body who determines valid countries is a trusted and reliable source and it has been the stance of the development team to use this list as the “source of truth”. This does tend to cause problems for example, if a […]