Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    @zakirstage,

    That option is part of the product settings so it’s not advisable to hide admin functionality. From that section you can control the payment buttons per product.

    You can always hide it using css:

    li.stripe_options.stripe_tab{
        display: none;
    }
    Thread Starter Zakir Sajib

    (@zakirstage)

    I understand your point. But we have multivendor system and we don’t want our vendor can manipulate the payment gateway while they create products and hide one of the payment gateways. As shop owner we want full control.

    I can hide using CSS but was looking for a hook.

    But love your plugin specially the reason we switched to your plugin because google pay and apple pay weren’t working using woocmmerce stripe plugin. We had issue, each time we click pay on G Pay button it says shipping state/county is required field. Which is not but we tried whole day but we couldn’t find a solution and then we found you and thank you. Awesome plugin. It would be good if we have more control in settings i.e. in mulitvendor environment.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @zakirstage,

    I see now why you would have that requirement. There is a way for you to accomplish this using filters provided by WC. In a future version, I can make a note to add a filter for more control.

    Here is a link to the plugin’s API docs:

    https://docs.paymentplugins.com/wc-stripe/api/source-class-PaymentPlugins.WC_Stripe_Admin_Meta_Box_Product_Data.html#12

    Here is an example of what you can do: (make sure to test this example before adding to your site)

    add_filter('woocommerce_product_data_tabs', function($tabs){
        // unset the tabs if this is a vendor which you can determine based on role
        if(!current_user_can('my_custom_role')){
            unset($tabs['stripe'];
        }
        return $tabs;
    }, 999, 1);

    I’m glad you’re liking the plugin, if you have a moment we always appreciate a kind review on the reviews page. Reviews

    Kind Regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide stripe settings in product admin’ is closed to new replies.