Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    unfortunately it’s not possible with the plugin.
    You need of a customization and I can provide the one valid to remove the button of YITH Product Slider Carousel.
    Please add following code in the file functions.php of your theme.

    if( !function_exists('yith_remove_buttons_for_vendors') ) {
        add_action('init', 'yith_remove_buttons_for_vendors', 15);
    
        function yith_remove_buttons_for_vendors()
        {
            $user = wp_get_current_user();
            if ( in_array( 'yith_vendor',$user->roles ) ) {
                global $YWC_Product_Slider;
                remove_action('admin_init', array($YWC_Product_Slider, 'add_shortcodes_button'));
            }
        }
    }

    I hope to be helpful for you.

    Thread Starter sankettripathi44_qhvfq0p6

    (@sankettripathi44_qhvfq0p6)

    Thank-you sir, it really works, please give any code like this to hide page builder option from vendors, only visual and text editor show to vendor and page builder not. please sir if possible because via page builder vendor can all my plugins widget and other tools which i don’t want.
    waiting with great hope

    Thread Starter sankettripathi44_qhvfq0p6

    (@sankettripathi44_qhvfq0p6)

    and once again thanks for above code, its working 100%
    A big thanks to you sir

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    which page builder are you using?

    Thread Starter sankettripathi44_qhvfq0p6

    (@sankettripathi44_qhvfq0p6)

    Thanks for your kindly reply but problem solved by Siteorigin Page Builder Team.

    But I have problem in YITH Multi Vendor and YITH Woocommerce Affiliate

    i want that vendor can not be an affiliate. I will sell product and take commission to vendor, and for more sale i will give some % of my profit to an affiliate and if a vendor also an affiliate so i can not earn. How can i do that, Please help me.

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    you have to override the template registration-form.php of the plugin YITH WooCommerce Affiliates.
    Follow this steps:
    1)Copy the file you find in wp-content\plugins\yith-woocommerce-affiliates\templates\shortcodes\registration-form.php
    2)Paste the file in wp-content\themes\your-theme-name\woocommerce\yith-wcaf\shortcodes\registration-form.php
    3) Edit the file and put following code before to print the form of affiliate plugin.

    <?php
        $current_user = wp_get_current_user();
        if( in_array( 'yith_vendor',$current_user->roles ) ){
            echo 'Vendor cannot require to become an affiliate';
            return;
        }
        ?>

    See the screenshot

    After that, your vendors will not be able to see the affiliate form

    See example

    I hope to be helpful for you.

    • This reply was modified 6 years, 5 months ago by YITHEMES.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to Hide some options from product edit page’ is closed to new replies.