WooCommerce: How to Write Shortcodes Without Outputting Content?

When I write tutorials like WooCommerce Separate Login & Registration Pages I often need to “write” on the screen the actual shortcode – but I don’t want the shortcode to output content!

For example, if I write [woocommerce_my_account] it’s guaranteed you won’t see “[woocommerce_my_account]“… you will see Business Bloomer’s My Account page content instead!

So there is a great workaround for those of you who write tutorials, snippets and WordPress articles and need to print the actual shortcode on the screen, without making it “process” its content and outputting it.

Enjoy! Continue reading WooCommerce: How to Write Shortcodes Without Outputting Content?

WooCommerce: Display All Products Purchased by User

When a WooCommerce customer is logged in, you might want to show the list of purchased products, for example in a custom “My Account” tab.

I decided to code this as a shortcode, so that you can use the snippet anywhere in your WooCommerce templates, as long as the user is logged in and as long as it has processing or completed orders. Enjoy! Continue reading WooCommerce: Display All Products Purchased by User