Edit plugin’s HTML output with Hooks
Edit plugin’s HTML output with Hooks
Edit plugin’s HTML output with Hooks
Instead of adding the filter inside of the add_action(), you need to call the filter directly. You have this in your functions.php file: function filter_after_setup_theme() { add_filter( ‘tc_bridge_for_woocommerce_content_order_table_is_after’, ‘__return_false’ ); } add_action(‘after_setup_theme’, ‘filter_after_setup_theme’); You are telling to WordPress to execute the filter when the action after_setup_theme happens (which is called before init hook, according to … Read more
How to track product price changes?
Right filter for rewriting page statuscode
Client side pre-save Javascript hook on all admin pages
Register/enqueue scripts only on certain admin pages
You have extra spaces around change_posts_order, inside the quotes: add_action( ‘pre_get_posts’, ‘ change_posts_order ‘ ); PHP can’t find a function with that name, because wits looking for that function preceded with the spaces. Remove the spaces to fix the issue: add_action( ‘pre_get_posts’, ‘change_posts_order’ );
Use the hook ‘save_post’ that pass 1 arguments: $post_id. Update_post_meta won’t trigger save_post. add_action(‘save_post’, ‘custom_add_meta’, 10, 1); function custom_add_meta($post_id){ update_post_meta($post_id, ‘meta_key’, $value); }
Plugin function in child theme
woocommerce_add_to_cart custom function called several times