Modify or change Specific Text (Empty Mini Cart Text)

This code came about when a client asked us to change the default empty cart text for the Elementor Header Cart Widget’s Mini Cart Popup. Elementor does not actually provide an easy way to do this. After searching through forums and Reddit, I found a solution that worked – although it can be a little […]

Add CSS for logged in users

This is a very simple function. The use case in the example is to hide specific menu links from users who aren’t logged so it’s checking if users are not logged in. We can use this and add to it a bit. Eg. we could have CSS for specific users roles, etc. function add_css_for_non_logged_in_users() { […]

Disable WooCommerce Cart and or Checkout

Basically, we just redirect these pages to the homepage. We also disable purchasing for good measure. if ( class_exists( ‘WooCommerce’ ) ) { add_filter( ‘woocommerce_is_purchasable’, ‘__return_false’ ); function disable_woo() { if ( is_cart() || is_checkout() ) { wp_redirect( home_url() ); exit; } } add_action( ‘template_redirect’, ‘disable_woo’ ); }

Add Custom Elementor Display Conditions For Product Categories that have children

This was a solution we needed for Renttech who have around 300 categories. They want products in the archive for categories that have no children, otherwise the category archive must show child categories. Adding custom a Elementor display condition for this is actually the best approach because then we can set include and exclude rules […]

Custom WooCommerce Text and Messages

Custom Woo Messages and Text This post will get filled out with custom php for various small changes to WooCommerce text, as well as some slightly more complex notices. Changing Stock Status Text In most cases the text being changed seems to be the text for backordering with notice when stock tracking is enabled. Having […]

Redirect WooCommerce Product Category Archives to Filtered Shop

This can potentially break archive links if we are not careful and make sure the redirects go to URLs that exist. The main purpose of this is if we want users to stay on the main shop page and use a dynamic mixed type filter for categories, and any other taxonomy – we just need […]