deprecated_function_run

Fires when a deprecated function is called.

Description

do_action( 'deprecated_function_run', (unknown) $function, (unknown) $replacement, (unknown) $version ); 

Parameters (3)

0. $function (unknown)
The function.
1. $replacement (unknown)
The replacement.
2. $version (unknown)
The version.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'deprecated_function_run', $function, $replacement, $version ); 
The following example is for adding a hook callback.
  1. // define the deprecated_function_run callback 
  2. function action_deprecated_function_run( $function, $replacement, $version ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'deprecated_function_run', 'action_deprecated_function_run', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'deprecated_function_run', 'action_deprecated_function_run', 10, 3 ); 

Defined (1)

The action is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. do_action( 'deprecated_function_run', $function, $replacement, $version );