PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

change priority of action woocommerce_before_shop_loop

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,
it's possible to change the priority of action 'woocommerce_before_shop_loop' of plugin
i tried in my functions.php:
remove_action( 'woocommerce_before_shop_loop', array( 'WOOF', 'woocommerce_before_shop_loop' ), 2);
add_action( 'woocommerce_before_shop_loop', array( 'WOOF', 'woocommerce_before_shop_loop' ), 32);

but not working.

Thanks of all! The plugin is very useful.

Hello

Check the sequence of initialization of this function - remove_action  - https://c2n.me/486Zrrk.png

Hi Pablo, thanks for reply.
You can explain the method becouse I already tried in different ways but the result is the same and not works.
I have changed in index.php of plugin at row 233:
add_action('woocommerce_before_shop_loop', array($this, 'woocommerce_before_shop_loop'), 2);
to
add_action('woocommerce_before_shop_loop', array($this, 'woocommerce_before_shop_loop'), 32);
and works as aspected but i don't want to touch the plugin.

Thanks for all

Hello

You should initialize remove_action  after I declared the hook and before this hook is executed.

Unfortunately, the function of the hooks does not depend on my plugin. This is the wordpress function - https://developer.wordpress.org/reference/functions/remove_action/

To  add  your  function  use  action  'init' with priority more than one.