Enable login by role both on frontend and backend
This commit is contained in:
@@ -226,7 +226,7 @@ class Wiaas_Admin_Organization {
|
||||
// get current user
|
||||
$current_user = wp_get_current_user();
|
||||
|
||||
update_user_meta($current_user->ID, '_wiaas_current_user_admin_role', $role->name);
|
||||
update_user_meta($current_user->ID, '_wiaas_admin_role', $role->name);
|
||||
|
||||
// switch user role
|
||||
$current_user->set_role($role->name);
|
||||
|
||||
@@ -107,10 +107,6 @@ class Wiaas_Admin_Product {
|
||||
$value = get_field('_wiaas_product_country', $post_id, true);
|
||||
$type = get_field('_wiaas_product_type', $post_id, true);
|
||||
|
||||
error_log($status);
|
||||
error_log($value);
|
||||
|
||||
|
||||
if (!empty($value) && $status === '_wiaas_no_country' ) {
|
||||
|
||||
wp_set_object_terms($post_id, $value, 'product_country', true);
|
||||
|
||||
@@ -148,6 +148,8 @@ class Wiaas_Admin_Package_Pricing {
|
||||
$pricing_rules,
|
||||
$commission,
|
||||
$max_cost_margin);
|
||||
|
||||
Wiaas_Access_Management::maybe_handle_product_access($package_id, get_post($package_id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user