WooCommerce::add_wc_admin_daily_wrapper
Wrapper for the wc_admin_daily This prevents the event failing when the class is not loaded. It loads the class if it exists, and then calls the actual action.
Метод класса: WooCommerce{}
Хуки из метода
Возвращает
void. Ничего (null).
Использование
$WooCommerce = new WooCommerce(); $WooCommerce->add_wc_admin_daily_wrapper();
Код WooCommerce::add_wc_admin_daily_wrapper() WooCommerce::add wc admin daily wrapper WC 11.2.1
public function add_wc_admin_daily_wrapper() {
try {
if ( class_exists( \Automattic\WooCommerce\Internal\Admin\Events::class ) ) {
\Automattic\WooCommerce\Internal\Admin\Events::instance();
}
} catch ( Throwable $e ) {
wc_get_logger()->error( 'Error initializing wc_admin_daily: ' . $e->getMessage(), array( 'source' => 'woocommerce-scheduled-actions' ) );
}
// phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment
do_action( 'wc_admin_daily' );
}