Automattic\WooCommerce\Internal\Abilities\Domain

ProductCreate::can_create_product │ public static │ WC 10.9.0

Check product creation access.

Метод класса: ProductCreate{}

Хуков нет.

Возвращает

bool.

Использование

$result = ProductCreate::can_create_product( $input ): bool;
$input(разное)
Ability input.
По умолчанию: array()

Список изменений

С версии 10.9.0 Введена.

Код ProductCreate::can_create_product() WC 11.3.0

public static function can_create_product( $input = array() ): bool {
	// Cap is not object-scoped for create.
	unset( $input );

	return wc_rest_check_post_permissions( 'product', 'create' );
}