• Resolved urka

    (@urka)


    We have installed the woocommerce plugin for stripe payments and it works on our checkout but if an user want to use the pay now link on order confirmation email the pay_for_order page is shown only with the wire transfer option.

    We have installed members because we manage also B&B orders who should only can pay with wire transfer. For this we have in our function.php following code which also works in checkout but block the payment options for all users in pay_for_order page.
    Why does the pay_for_order page not check if the user is a member of a group? For open the page a login is necessary .

    //Disable payment gateway Kreditkard - stripe  - paypal - for member of group Dealer
    function my_creditcard_disable_manager( $available_gateways ) {
    global $woocommerce;
    if ( isset( $available_gateways['stripe'] ) && current_user_can('dealer')) {
    unset( $available_gateways['stripe'] );
    } 
    if ( isset( $available_gateways['stripe_sofort'] ) && current_user_can('dealer') ) {
    unset( $available_gateways['stripe_sofort'] );
    } 
    if ( isset( $available_gateways['stripe_ideal'] ) && current_user_can('dealer') ) {
    unset( $available_gateways['stripe_ideal'] );
    } 
    if ( isset( $available_gateways['paypal'] ) && current_user_can('dealer') ) {
    unset( $available_gateways['paypal'] );
    } 
    
    return $available_gateways;
    }
     
    add_filter( 'woocommerce_available_payment_gateways', 'my_creditcard_disable_manager' );

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support abwaita a11n

    (@abwaita)

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘problem with payment opions on pay_for_order page’ is closed to new replies.