• Resolved sarahsas

    (@sarahsas)


    Hello, I’m having an issue with wholesale customers checkout options – I’ve got them set to “invoice only” in the dashboard, see screenshot here: https://imgur.com/wCcD1Jk. So when I’m logged in as a wholesale customer, if I hover over the cart option and choose CHECKOUT from there, all works as expected and “invoice later” is the only option. HOWEVER if I hover over the cart and choose “view cart” instead, the Openpay and Afterpay buttons are both showing up as options, when they shouldn’t be available: https://imgur.com/xVcPLkt. Any advice?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Fauzan Azizie

    (@fauzanade)

    Hi @sarahsas,

    From your screenshot here: https://imgur.com/wCcD1Jk

    It seems that you are using a third-party plugin to restrict the payment gateway. Maybe it is something called the Role-Based Method?

    The role-based method has restricted them properly on the checkout page. However, due to AfterPay adding the checkout shortcut via different hooks, it’s not filtered by their rule.

    You can hide them via custom CSS. Could you add the following snippet to your child theme’s style.css:

    add_action( 'wp_head' , function() {
      global $wc_wholesale_prices_premium;
      $user_wholesale_role = $wc_wholesale_prices_premium->wwpp_wholesale_roles->getUserWholesaleRole();
      if( !empty( $user_wholesale_role ) ) {
        
        //your custom CSS here
    
        echo '<style type="text/css">.page-id-5 button#afterpay_express_button, p.afterpay-paragraph, .opycart{
        display: none;}</style>'; }
    });

    Please let me know how it goes ??

    Thread Starter sarahsas

    (@sarahsas)

    Thanks @fauzanade I’ve actually already used CSS to temporarily hide them ?? so yes that works for now. I was hoping to find a more “correct” solution. I’ll try bringing it to the attention of the role-based plugin team and see if they can investigate. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wholesale issue with Afterpay & Openpay’ is closed to new replies.