WordPress callback function attached to the
add_action() hook can be removed using
remove_action(). Refer WordPress Codex for details.
Let us look at a real world example. I wanted to remove the Breadcrumb added by WooCommerce in one of the projects in my day job. WooCommerce attaches the
woocommerce_breadcrumb() callback to the
And to remove the callback, all I’ve to do is the following. Remember the
$function_to_remove and the
$priority must match in order the remove the callback function.