Automattic\WooCommerce\Internal\Abilities\Domain

ProductCreate::can_create_product │ public static │ WC 10.9.0

Check product creation access.

Method of the class: ProductCreate{}

No Hooks.

Returns

bool.

Usage

$result = ProductCreate::can_create_product( $input ): bool;
$input(mixed)
Ability input.
Default: array()

Changelog

Since 10.9.0 Introduced.

ProductCreate::can_create_product() code 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' );
}