Knowing when you don’t need to use custom development techniques is possibly more important than knowing advanced development.
Each line of custom code creates at least a little “code debt” creates opportunities for problems in the future changes.
With that in mind, we’ll devote a section to understanding what’s already available Admittedly, a lightweight section, but a good breather after our esoteric Deep Dive to you in the WooCommerce/WordPress ecosystem, and how you can avoid writing code that’s already been written.
Type | Blocks |
---|---|
Product Blocks | Featured Product Hand-picked Products Best Selling Products Newest Products On Sale Products Top Rated Products All Products |
Taxonomy Based | Featured Category Product Categories List Products by Category Products by Attribute Products by Tag |
Filter Based | Product Search Filter by Price Filter by Attribute Active Product Filters |
Page/Shortcode replacements | Checkout Cart |
Reviews | All Reviews Reviews by Product Reviews by Category |
If you need to do an in depth review of what one of the built-in WooCommerce blocks accomplishes there are two place you should look:
Tip: you can zoom in/out on the file directories in this slide with CTRL+click
Gutenberg makes it pretty easy to find blocks.This magic occurs through the block.json file.
By typing free form text in the add a block tool, WordPress will return all matching blocks on your site.
If no matching blocks are found locally, it will search WordPress.org to check for plugins with matching blocks.
The Gutenberg block search will not always find all of blocks in the ecosystem. So you should definitely check the WordPress.org repo to see of there are any block plugins that will help with your project. Take a look at theses “heavy hitters” to get started
Keep in mind the the woocommerce-blocks package is very much a work in progress.
Blocks may exist tomorrow that don’t exist today. It is an exciting fast-paced time in the world of developing and designing online stores.
We all need to stay nimble.
The next sections will look at how to leverage existing blocks and develop completely new blocks.
Before moving on, let’s do a quick knowledge check to close out this topic.
0 of 3 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 3 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Which of the following block are replacements for existing WooCommerce page shortcodes?
(T/F) Many of WooCommerce’s blocks use Server Side Rendering.
Where can you find the source JS for WooCommerce blocks?