تابع ووکامرسی wc_do_deprecated_action نمایش هشدار منسوخ برای action استفاده شده

تابع ووکامرسی wc_do_deprecated_action – نمایش هشدار منسوخ برای action استفاده شده
Syntax – سینتکس
wc_do_deprecated_action( (string) $action, (array) $args, (string) $deprecated_in, (string) $replacement );
Parameters – پارامتر ها (4)
- 1- $action (string)
- 2- $args (array)
- 3- $deprecated_in (string)
- 4- $replacement (string)
Usage – نحوه استفاده
if ( !function_exists( 'wc_do_deprecated_action' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php';
}
// The action.
$action = '';
// The args.
$args = array();
// The deprecated in.
$deprecated_in = '';
// The replacement.
$replacement = '';
// NOTICE! Understand what this does before running.
$result = wc_do_deprecated_action($action, $args, $deprecated_in, $replacement);
Defined – محل تعریف
/includes/wc-deprecated-functions.php
function wc_do_deprecated_action( $action, $args, $deprecated_in, $replacement ) {
if ( has_action( $action ) ) {
wc_deprecated_function( 'Action: ' . $action, $deprecated_in, $replacement );
do_action_ref_array( $action, $args );
}
}
versions – نسخه ها
از نسخه : 3.0.0
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر