Handle wiaas documents

This commit is contained in:
Almira Krdzic
2018-10-03 16:46:41 +02:00
parent 6afffc7eca
commit 3ad210f883
42 changed files with 2258 additions and 258 deletions

View File

@@ -78,16 +78,6 @@ 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_private_products');
$customer_role->add_cap('read_shop_order');
$customer_role->add_cap('publish_shop_orders');
}
function wiaas_db_update_enable_orders_access_management() {
$post_types_option = Groups_Options::get_option( Groups_Post_Access::POST_TYPES, array() );
@@ -125,4 +115,18 @@ function wiaas_db_setup_exclusive_taxonomies() {
function wiaas_db_setup_default_cl() {
wp_insert_term(Wiaas_Pricing::COMMERCIAL_LEAD_NAME, Wiaas_User_Organization::TAXONOMY_NAME);
}
function wiaas_db_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_orders');
// user
$customer_role->add_cap('list_users');
$customer_role->add_cap('edit_users');
}