Automattic\WooCommerce\Admin\API
OnboardingTasks::is_experiment_product_task()
Метод класса: OnboardingTasks{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$OnboardingTasks = new OnboardingTasks(); $OnboardingTasks->$template_path = __DIR__ . '/Templates/' . $template_name . '_product.csv';
Код OnboardingTasks::is_experiment_product_task() OnboardingTasks::is experiment product task WC 8.7.0
$template_path = __DIR__ . '/Templates/' . $template_name . '_product.csv'; $template_path = apply_filters( 'woocommerce_product_template_csv_file_path', $template_path, $template_name ); $import = self::import_sample_products_from_csv( $template_path ); if ( is_wp_error( $import ) || ! is_array( $import['imported'] ) || 0 === count( $import['imported'] ) ) { return new \WP_Error( 'woocommerce_rest_product_creation_error', /* translators: %s is template name */ __( 'Sorry, creating the product with template failed.', 'woocommerce' ), array( 'status' => 500 )