Automattic\WooCommerce\Admin\API
OnboardingTasks::is_experiment_product_task()
Method of the class: OnboardingTasks{}
No Hooks.
Return
null
. Ничего (null).
Usage
$OnboardingTasks = new OnboardingTasks(); $OnboardingTasks->$template_path = __DIR__ . '/Templates/' . $template_name . '_product.csv';
OnboardingTasks::is_experiment_product_task() OnboardingTasks::is experiment product task code WC 8.0.2
$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 ) || 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 )