Exclude Product Tag from Coupons

This code snippet excludes product with a specific WooCommerce product_tag from being included in any coupon discount. Simply replace “kits” with the slug of the product_tag you want to exclude. has_term() also accepts an array in the first argument. Update: once again, variable products got the best of me. In WooCommerce, the product_tag is associated …

Change Number of Search Results for Specific User in Woocommerce

Normally Woocommerce pulls the number of results from the standard WordPress settings, usually set to 20-30 for most installs. For many environments it is helpful to keep this number relatively low for performance reasons. However, for specific logged in users, it can be helpful to set a higher default. My client wanted his default set …

Format Billing Phone Number on Woocommerce

By default, Woocommerce does not format the billing phone number entered into the checkout field. However the user formats the number, that is how it gets entered into the database and how it is displayed throughout the Woocommerce Admin. Unformatted phone numbers are difficult to read and can also create difficulties when trying to search …

Display PayPal Fee on Woocommerce Order

This code snippet works with the Paypal Standard Woocommerce Payment Gateway. It adds the PayPal fee and payout information to the WooCommerce Edit Order Screen. If you are using WooCommerce PayPal Checkout Payment Gateway, this snippet is not needed. I am not sure about compatibility or necessity for any of the other many PayPal gateways.