Automattic\WooCommerce\Internal\Abilities\Domain
ProductUpdate::current_user_can_publish_products
Check whether the current user can publish products.
Method of the class: ProductUpdate{}
No Hooks.
Returns
bool.
Usage
$result = ProductUpdate::current_user_can_publish_products(): bool;
ProductUpdate::current_user_can_publish_products() ProductUpdate::current user can publish products code WC 11.3.0
private static function current_user_can_publish_products(): bool {
// phpcs:ignore WordPress.WP.Capabilities.Unknown -- WooCommerce registers the publish_products capability.
return current_user_can( 'publish_products' );
}