Archives: Snips

Snip Description

Remove Packling PRO Drop Off Woocommerce Checkout Notice

I, nor the rest of the internet knows why the Packlink Pro Plugin adds a message in store checkouts that says You have to enter your address first in order to search for Drop-Off location. Drop what off? I’m the customer, I’m buying something, not dropping…

white and black train station

Hide out of stock items from products shortcodes

If you’re managing an e-commerce website, it’s crucial to offer a seamless shopping experience for your customers. One way to enhance this experience is by hiding out-of-stock items from product shortcodes. This ensures that customers only see products that are available for purchase, thereby streamlining their…

top view photography of broken ceramic plate

woocommerce_add_to_cart_fragments not working since version 7.8

The Cart Fragments script, responsible for updating the cart widget after a successful add-to-cart event, can cause a performance issue on stores not making use of that functionality. To mitigate this, the script will now only be enqueued if using the Mini Cart widget. This change…

red mail box on road

Royal Mail Click and Drop IP Addresses

Recently we had some issues with CloudFlare blocking Royal Mail’s Click and Drop IP Addresses – we had to whitelist them in CloudFlare. These are the IP addresses to set 51.136.83.33 Royal Mail 52.155.224.209 Royal Mail  

Remove the Zapier notice on posts, pages and products

There doesn’t appear to be a way to remove the “Connect Yoast SEO with Zapier to instantly share your published posts with 2000+ destinations such as Twitter, Facebook and more.” that clutters up the Publish meta box. Other options can be disabled in the Yoast SEO…

white concrete building near trees during daytime

Update WooCommerce database using the wp cli

In certain cases, the WooCommerce plugin will update, but the WooCommerce database update will fail. This mismatch between the WooCommerce database and WooCommerce can cause quite a few potential issues. To solve this, the WooCommerce database can be updated through the command line. wp wc update…

closeup photo of ferret

Remove WooCommerce DB Notices

Sometimes WooCommerce gets stuck showing admins the same notices over and over, even when the action has been completed. WooCommerce database update done is a common culprit. One solution is to manually mark the actions as “actioned” in the database. You’ll find a table wp_wc_admin_notes where…

Add custom field below order notes

The official WooCommerce documentation shows you how to add custom fields to the billing or shipping section of the checkout. 

This guide shows you how to add fields in the Order Notes section of the checkout.

Move the Yoast WordPress SEO Meta Box below the Product Data Box

Yoast is big and bossy, with it’s default meta box placement directly below the main content, it can break the flow of entering Product Data and confuse clients. Here’s a snippet to make it appear at the bottom, below the Product Data meta box, ensuring a nice flow and grouping of WooCommerce Data

Change the “Ship to a different address?” default state

There’s an interesting discussion in WooCommerce Issue #2571. regarding the default state of the “Deliver to a different address” checkbox.

For a less cluttered checkout screen and from a UX view point, we could uncheck it by default

How to hide the single product page

This will hide the single product page the proper WordPress way by making the product not public. Pop this into your functions.php file. add_filter( ‘woocommerce_register_post_type_product’,’hide_product_page’,12,1); function hide_product_page($args){ $args[“publicly_queryable”]=false; $args[“public”]=false; return $args; }