Home Forums WoodMart support forum i have a problem in Dynamic Discount

i have a problem in Dynamic Discount

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #542938

    huss09.rajab
    Participant

    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 2 months, 1 week ago by huss09.rajab.
    #543087

    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.

    #543372

    huss09.rajab
    Participant

    but i tried one of these plugins and give the shop manager all permissions and it still not working

    #543373

    huss09.rajab
    Participant

    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

    #543944

    Artem Temos
    Keymaster

    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' );
    }
    #543946

    huss09.rajab
    Participant

    it works like a charm ! thanks 🙂

    #543965

    Artem Temos
    Keymaster

    You are welcome. Feel free to contact us if you have any further questions.

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘i have a problem in Dynamic Discount’ is closed to new replies.