Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Shipping::has_physical_products()public staticWC 1.0

Check if the store has physical products.

{} It's a method of the class: Shipping{}

No Hooks.

Return

true|false.

Usage

$result = Shipping::has_physical_products();

Code of Shipping::has_physical_products() WC 6.8.2

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 );
}