Support » Plugin: WooCommerce » guest checkout for paypal only

  • hi, i want to know if is possible to eneble guest checkout for paypal only and registered checkout for bacs and cheque??

    i want to let people using paypal to buy witout any registration at my site, but if they are going to buy via cheque or bacs make them register at my site, is that possible??

    thanks

Viewing 1 replies (of 1 total)
  • For this requirement, you will have to customize below hook to apply payment gateways as per conditions.
    function paypal_enable_manager( $available_gateways ) {
    global $woocommerce;
    if ( isset( $available_gateways[‘bacs’] ) && !current_user_can(‘administrator’) ) {
    unset( $available_gateways[‘bacs’] );
    }
    return $available_gateways;
    }
    add_filter( ‘woocommerce_available_payment_gateways’, ‘paypal_enable_manager’ );

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.