Join Patrick Rauland for an in-depth discussion in this video Accessing settings on the front end, part of WordPress Ecommerce: WooCommerce Plugins.
- [Narrator] We did all of that work to add a settings page…and add settings to the settings page.…Now let's see what we can do with that…by accessing that data on the front end.…Let's start by writing a new hook.…I'm going to go to my code editor,…and then up in the constructor, I'm going to add a new hook.…Now normally I would add something like add action,…and init is quite popular here.…In fact, if you go to wordpress.org codex, you can see…that init is one of the more popular hooks,…and it's the one I use most often.…
However, in this specific case, because we're using…WooCommerce conditional tags, you'll see that there's a note…right here that says if you're going…to use conditional tags, the earliest action hook…you can use is wp.…So it runs a little bit later than init,…but it's still very useful.…Let's go ahead and go back.…So I'm going to say add action, wp,…and now I'm going to write the function…that runs at this time.…
On line 24, array, within this object,…and I'm going to call this maybe disable checkout.…
- 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.