Omnibus Directive: Example snippet to change the discount rules omnibus message display position
Code snippet to change the display position of the Omnibus Directive discount rules message.
function custom_sale_hook($hook) {
return 'woocommerce_before_add_to_cart_quantity'; //Enter the hook name here (as per your needs)
}
add_action('wdr_omnibus_directive_before_loaded', function() {
add_filter('wdr_omnibus_directive_show_message_position', 'custom_sale_hook');
}, 0);