refactor code

This commit is contained in:
GotPPay
2018-08-31 18:35:48 +02:00
parent bc15706f07
commit 513401c9db
2 changed files with 2 additions and 6 deletions

View File

@@ -9,7 +9,6 @@ class Wiaas_DB_Update {
'20180801222206' => 'wiaas_db_update_setup_gravity',
'20180802222206' => 'wiaas_db_update_add_delivery_process_forms',
'20180807222206' => 'wiaas_db_update_setup_customer_capabilities',
'20180809134511' => 'wiaas_db_update_add_customer_read_permission',
'20180811134511' => 'wiaas_db_update_enable_orders_access_management',
'20180813134511' => 'wiaas_db_update_enable_order_numbers',
'20180826153509' => 'wiaas_create_broker_access_group'

View File

@@ -82,13 +82,10 @@ 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_private_products');
$customer_role->add_cap('read_shop_order');
$customer_role->add_cap('publish_shop_order');
}
function wiaas_db_update_add_customer_read_permission() {
$role = get_role( 'customer' );
$role->add_cap( 'read_private_products' );
}
function wiaas_db_update_enable_orders_access_management() {