WC_Install::get_core_capabilities()
Get capabilities for WooCommerce - these are assigned to admin/shop manager during installation or reset.
Method of the class: WC_Install{}
No Hooks.
Return
Array
.
Usage
$result = WC_Install::get_core_capabilities();
WC_Install::get_core_capabilities() WC Install::get core capabilities code WC 9.4.2
public static function get_core_capabilities() { $capabilities = array(); $capabilities['core'] = array( 'manage_woocommerce', 'view_woocommerce_reports', ); $capability_types = array( 'product', 'shop_order', 'shop_coupon' ); foreach ( $capability_types as $capability_type ) { $capabilities[ $capability_type ] = array( // Post type. "edit_{$capability_type}", "read_{$capability_type}", "delete_{$capability_type}", "edit_{$capability_type}s", "edit_others_{$capability_type}s", "publish_{$capability_type}s", "read_private_{$capability_type}s", "delete_{$capability_type}s", "delete_private_{$capability_type}s", "delete_published_{$capability_type}s", "delete_others_{$capability_type}s", "edit_private_{$capability_type}s", "edit_published_{$capability_type}s", // Terms. "manage_{$capability_type}_terms", "edit_{$capability_type}_terms", "delete_{$capability_type}_terms", "assign_{$capability_type}_terms", ); } return $capabilities; }