Updated Clean Up Functions

February 3, 2022 (2 years ago)
Best Practices, Elementor, Functions, WooCommerce, WordPress

I’m currently using these functions in my new builds to clean up features I don’t use:

The last function removes all block library and WooCommerce styles, as I don’t use the block editor, and style my e-commerce pages using Elementor.

 

WooCommerce – Conditional Ship to a Different Address Selection

October 31, 2017 (6 years ago)
Functions, JS, WooCommerce, WordPress

The scenario is this:

The site has multiple shipping methods (multiple client locations, and the option to ship to “Other”.)

I wanted to show the address panel if “Other” location was chosen, and hide the “Ship to Another Location”  option heading on the shipping page if a client location was chosen.

None of this was strictly necessary, but it makes for a smoother customer experience.

This went into my functions.php file.

Then, this is the hide_ship_to.js script file. (uploaded to the theme directory)