WooWeekly #284: Thank You Page, Clone Site, BOGO

While I find myself right in the middle of the first busy working week of the year, I wanted to wish you all a rewarding and profitable year. If you work with WooCommerce, you’ve chosen the right product. There’s lots of $$$ to be made. Never give up!

So, welcome back to our WooCommerce Weekly appointment – a series of WooCommerce tutorials put together by yours truly so that you can learn something new.

New WooCommerce Tutorials

WooCommerce: Include Custom WP Page @ Thank You Page

Yes, you can redirect users to a custom thank you page (but please note all your ecommerce Google Analytics tracking will be skipped…). Yes, you can add content to the default thank you page, for example a Twitter “share your purchase” box. And yes, you can even “include” content from another WordPress page!

Basically, in this article, you will see how to write custom content for your WooCommerce Thank You page as a separate WordPress Page, so that you can use WYSIWYG, Gutenberg or a page builder to create something unique – and then ask WooCommerce to “get it” and “include” such page inside the default order-received endpoint.

If you’re not sure what I mean, try taking a look at the two screenshots. Then, copy the simple snippet and see the result: https://businessbloomer.com/woocommerce-include-custom-wp-page-thank-you-page

Revised WooCommerce Tutorials

WooCommerce: “Buy One Get One” (Without a Plugin!)

Case scenario: if you add a product ID to cart with a specific, you want another product automatically added to cart (Buy One Get One, or “BOGO”): https://businessbloomer.com/woocommerce-buy-1-product-add-free-product-cart-programmatically/

WooCommerce: Edit Add to Cart Min, Max & Step Quantity

So, here’s how you can add, with a few lines of PHP, a minimum, maximum, increment and starting value to your Add to Cart quantities on the single product and cart pages: https://businessbloomer.com/woocommerce-define-add-cart-min-max-incremental-quantities/

WooCommerce: Get List of Product IDs (All, by Tag, by Cat)

When you work with WooCommerce PHP snippets, you often need to “get” stuff off your WordPress database in order to make some calculations and return the result on the screen. And if there is something I often google is “How do I get all my store’s product IDs?”: https://businessbloomer.com/woocommerce-get-return-all-product-ids/

WooCommerce: Sort Shipping Costs from Low to High

Thankfully, with a simple “uasort” PHP function, it’s possible to take the shipping rates array and sort it by amount before returning it back to the screen. If you don’t know PHP, simply copy/paste: https://businessbloomer.com/woocommerce-sort-shipping-costs-low-high/

Author

  • Rodolfo Melogli

    Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

    View all posts

Proudly supported by

Join them?