i have a problem in Dynamic Discount
-
hi i have a problem in dynamic discount
as an admin i can create a new dynamic discount and add products etc..
but i have a shop manager role in my website (the woocommerce role) that cant search product to choose one as in the image https://ibb.co/nBvfg1g
in my admin account here is the result
https://ibb.co/f17kzpw
how can i give the shop manager access to choose products in dynamic discount or anything that i can fix this problem ??
-
This topic was modified 1 year, 5 months ago by
huss09.rajab.
Hello,
You need to install User manager roles or something like this and set different access to different users roles.
https://wordpress.org/plugins/user-role-editor/
We have not tested any plugins with our theme that is why we can hardly recommend any.
Best Regards.
but i tried one of these plugins and give the shop manager all permissions and it still not working
if there is a specific thing to do it will be better because i dont want the shop manager user to be admin
and my problem is not about roles i thought about roles just to solve the problem
-
This reply was modified 1 year, 5 months ago by
huss09.rajab.
Try to add the following PHP code snippet to the child theme functions.php file to do this
if ( ! function_exists( 'woodmart_admin_localized_string_array_change' ) ) {
/**
* Create new template nonce for shop managers.
*
* @param array $localize_data List of woodmartConfig settings.
*/
function woodmart_admin_localized_string_array_change( $localize_data ) {
if ( current_user_can( 'edit_products' ) || current_user_can( 'edit_pages' ) ) {
$localize_data = array_merge(
$localize_data,
array(
'get_new_template_nonce' => wp_create_nonce( 'wd-new-template-nonce' ),
)
);
}
return $localize_data;
}
add_filter( 'woodmart_admin_localized_string_array', 'woodmart_admin_localized_string_array_change' );
}
it works like a charm ! thanks 🙂
You are welcome. Feel free to contact us if you have any further questions.
The topic ‘i have a problem in Dynamic Discount’ is closed to new replies.