Add unit tests for backend and refactor few things on frontend
This commit is contained in:
@@ -84,7 +84,26 @@ function wiaas_db_update_setup_customer_capabilities() {
|
||||
$customer_role->add_cap('read_private_shop_orders');
|
||||
$customer_role->add_cap('read_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() {
|
||||
$post_types_option = Groups_Options::get_option( Groups_Post_Access::POST_TYPES, array() );
|
||||
|
||||
$post_types_option['shop_order'] = array(
|
||||
'add_meta_box' => true
|
||||
);
|
||||
|
||||
Groups_Options::update_option(Groups_Post_Access::POST_TYPES, $post_types_option);
|
||||
}
|
||||
|
||||
function wiaas_db_update_enable_order_numbers() {
|
||||
update_option('wcj_order_numbers_enabled', 'yes');
|
||||
update_option('wcj_order_number_sequential_enabled', 'no');
|
||||
update_option('wcj_order_number_counter', '0');
|
||||
update_option('wcj_order_number_counter_reset_enabled', 'no');
|
||||
update_option('wcj_order_number_prefix', '1000000');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user