A
A
Anton Seredny2017-03-14 00:32:13
WordPress
Anton Seredny, 2017-03-14 00:32:13

Where can I read about woocommerce development besides the documentation?

Where can I find really feng shui articles on woocommerce theme development?
Previously, WP Panda had a website, now it's empty...
Can you share links to useful reading? In addition, it would be interesting to hear the algorithm of work when creating a theme with woocommerce on board.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2017-03-14
@smidl

A filter cannot be hung on an action, an action is an event, filters are needed to modify the parameters received or returned by the function. To apply a filter, the renderable must have apply_filters( 'filter_name' , $array, blah blah blah whatever )
do_action( 'woocommerce_before_main_content' ); - this is an event on which functions are hung, it is politely written on top what functions are hung on it. In this case, these are breadcrumbs with a priority of 20.
To look at woocommerce_breadcrumb, go to the woocommerce github and look for function woocommerce_breadcrumb in it, find it in the file https://github.com/woocommerce/woocommerce/blob/75... and from it code we see that,
1. filter / woocommerce_breadcrumb_defaults - we can change the markup
2. filter / woocommerce_breadcrumb_home_url - we can change the address of the main
page 3. action / woocommerce_breadcrumb - the method that generates the micro markup is hung, we can disable it, connect our own, process the data additionally
4. wc_get_template( 'global/breadcrumb.php - we can override the output template completely

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question