10 Simple WooCommerce Code Hacks – in a Good Way!

October 13, 2021

If you’ve stumbled across this post, then you probably caught my talk at WooSesh 2021. Thanks, and welcome!

Here are the 10 code snippets I shared in the session called 10 simple WooCommerce code hacks – in a good way!. Feel free to use and modify them as you’d like!

Slides/recording coming soon.

QUICK NOTE: Before we get to the snippets, I also want to share this plugin here. I mentioned it in the session and it’s called Code Snippets. It allows you to easily add code to your site. Okay, carry on.


Add item(s) to shop loop


Switch “processing” orders directly to “completed”


Create a shortcode to show if a customer previously bought a product


“Add Sample to Cart” button on the single product page

via https://www.businessbloomer.com/woocommerce-sales/


Add custom column to order admin page


Change “Select options” text for variable products on shop/archive pages


Redirect to checkout on “Add to Cart”

via https://www.businessbloomer.com/woocommerce-redirect-checkout-add-cart/


Customize “Added to Your Cart” message

via https://www.businessbloomer.com/woocommerce-remove-product-successfully-added-cart-message/


Custom notice on a single product page

via https://www.businessbloomer.com/woocommerce-sales/


Upsell products on the “Thank you” page

via https://www.businessbloomer.com/woocommerce-sales/


Thanks again for attending WooSesh 2021 and I hope you’re able to use these snippets in your project!!

Wanna chat about this article or any others? Feel free to DM me or mention me on Twitter @marcusdburnette to start a conversation!