Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Shipping::has_physical_products()public staticWC 1.0

Check if the store has physical products.

Method of the class: Shipping{}

No Hooks.

Return

true|false.

Usage

$result = Shipping::has_physical_products();

Shipping::has_physical_products() code WC 8.9.0

public static function has_physical_products() {
	$profiler_data = get_option( OnboardingProfile::DATA_OPTION, array() );
	$product_types = isset( $profiler_data['product_types'] ) ? $profiler_data['product_types'] : array();

	return in_array( 'physical', $product_types, true );
}