Join Patrick Rauland for an in-depth discussion in this video Hide the checkout page, part of WordPress Ecommerce: WooCommerce Plugins.
- [Voiceover] You may have noticed…that our function runs all the time, and that's a problem.…We really only want it to run on the checkout page.…And, of course, we want it to do something smarter…than display a white page.…So we're going to use…a Woo Commerce function to help with this.…There's a ton a conditional tags in Woo Commerce…to check for certain things.…What we're going to want to use is is_checkout().…Which is right here.…And this conditional will return true…when were on the checkout page.…
So, I'm going to go back to my code,…and in the maybe_disable_checkout() function,…instead of echo and exit,…I'm going to add,…&& is_checkout().…Now if we save this and go back to our home page,…it's no longer running on the home page.…If you go to the cart, totally fine.…And if you go to the checkout,…that's when you get that error.…So this conditional is very useful,…to make sure that we're only running code…on the right pages.…
Now on to the second problem, the fact that…it's just a white background with black text.…
- Creating a WooCommerce plugin
- Finding hooks within WooCommerce
- Creating settings pages
- Analyzing WooCommerce settings
- Configuring settings
- Customizing the edit product page
- Using hooks on the product page
- Customizing the WooCommerce checkout
- Adding custom order statuses
Skill Level Intermediate
Q: This course was updated on 08/07/2018. What changed?
A: The following topics were updated: adding a meta box, saving product fields, customizing product titles, and adding data to product page tabs.
1. Overview of Customizing WooCommerce
Print an admin notice4m 21s
2. Create Settings Pages
3. Customize the Edit Product Page
4. Customize the Product Page
5. Customize the WooCommerce Checkout
6. Customize the WooCommerce Admin
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.