enhance customer role capability
This commit is contained in:
@@ -7,7 +7,8 @@ class Wiaas_DB_Update {
|
||||
private static $db_updates = array(
|
||||
'20180728222206' => 'wiaas_db_update_enable_product_by_user_role',
|
||||
'20180801222206' => 'wiaas_db_update_setup_gravity',
|
||||
'20180802222206' => 'wiaas_db_update_add_delivery_process_forms'
|
||||
'20180802222206' => 'wiaas_db_update_add_delivery_process_forms',
|
||||
'20180807222206' => 'wiaas_db_update_setup_customer_capabilities'
|
||||
);
|
||||
|
||||
public static function execute() {
|
||||
|
||||
@@ -76,4 +76,11 @@ function wiaas_db_update_add_delivery_process_forms() {
|
||||
}
|
||||
|
||||
do_action('gform_forms_post_import', $created_forms);
|
||||
}
|
||||
|
||||
function wiaas_db_update_setup_customer_capabilities() {
|
||||
$customer_role = get_role('customer');
|
||||
|
||||
$customer_role->add_cap('read_private_shop_orders');
|
||||
$customer_role->add_cap('read_shop_order');
|
||||
}
|
||||
Reference in New Issue
Block a user