2 added 18 characters in body
source | link

There'sThere are two things that confuse people when trying to remove a hook:

  1. The remove_action()remove_action() or remove_filter()remove_filter() calls must take place after the add_action()add_action() or add_filter()add_filter() calls, and before the hook is actually fired. This means that you must know the hook when the calls were added and when the hook is fired.
  2. The remove_action()remove_action() or remove_filter()remove_filter() calls must have the same priority as the add_action()add_action() or add_filter()add_filter() call

If these hooks were added on the init filter at the default priority, then to remove them, we'd simply hook into init at a priority later than 10 and remove them.

add_action( 'init', 'wpse_106269_remove_hooks', 11 );
function wpse_106269_remove_hooks(){
    remove_action( 'sportspress_before_single_player', 'sportspress_output_player_details', 15 );
    remove_action( 'sportspress_single_player_content', 'sportspress_output_player_statistics', 20 );
}

From https://codex.wordpress.org/Function_Reference/remove_action

Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.

There's two things that confuse people when trying to remove a hook:

  1. The remove_action() or remove_filter() calls must take place after the add_action() or add_filter() calls, and before the hook is actually fired. This means that you must know the hook when the calls were added and when the hook is fired.
  2. The remove_action() or remove_filter() calls must have the same priority as the add_action() or add_filter() call

If these hooks were added on the init filter at the default priority, then to remove them, we'd simply hook into init at a priority later than 10 and remove them.

add_action( 'init', 'wpse_106269_remove_hooks', 11 );
function wpse_106269_remove_hooks(){
    remove_action( 'sportspress_before_single_player', 'sportspress_output_player_details', 15 );
    remove_action( 'sportspress_single_player_content', 'sportspress_output_player_statistics', 20 );
}

From https://codex.wordpress.org/Function_Reference/remove_action

Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.

There are two things that confuse people when trying to remove a hook:

  1. The remove_action() or remove_filter() calls must take place after the add_action() or add_filter() calls, and before the hook is actually fired. This means that you must know the hook when the calls were added and when the hook is fired.
  2. The remove_action() or remove_filter() calls must have the same priority as the add_action() or add_filter() call

If these hooks were added on the init filter at the default priority, then to remove them, we'd simply hook into init at a priority later than 10 and remove them.

add_action( 'init', 'wpse_106269_remove_hooks', 11 );
function wpse_106269_remove_hooks(){
    remove_action( 'sportspress_before_single_player', 'sportspress_output_player_details', 15 );
    remove_action( 'sportspress_single_player_content', 'sportspress_output_player_statistics', 20 );
}

From https://codex.wordpress.org/Function_Reference/remove_action

Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.

1
source | link

There's two things that confuse people when trying to remove a hook:

  1. The remove_action() or remove_filter() calls must take place after the add_action() or add_filter() calls, and before the hook is actually fired. This means that you must know the hook when the calls were added and when the hook is fired.
  2. The remove_action() or remove_filter() calls must have the same priority as the add_action() or add_filter() call

If these hooks were added on the init filter at the default priority, then to remove them, we'd simply hook into init at a priority later than 10 and remove them.

add_action( 'init', 'wpse_106269_remove_hooks', 11 );
function wpse_106269_remove_hooks(){
    remove_action( 'sportspress_before_single_player', 'sportspress_output_player_details', 15 );
    remove_action( 'sportspress_single_player_content', 'sportspress_output_player_statistics', 20 );
}

From https://codex.wordpress.org/Function_Reference/remove_action

Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.