• Hello, thank you very much for your work on this plugin. It is greatly appreciated.

    I was wondering if you could please add options to the plugin for bypassing specific payment_request_type’s such as ‘apple_pay’. I’m hoping some options could be added to the plugin to target the specific options such as apple_pay, google_pay, etc. It would be beneficial to bypass these express payment methods while still keeping turnstile enabled for the credit card form method of Stripe.

    // Skip if Turnstile disabled for payment method
    $skip = 0;
    if ( isset( $_POST['payment_method'] ) ) {
    $chosen_payment_method = sanitize_text_field( $_POST['payment_method'] );
    // Retrieve the selected payment methods from the cfturnstile_selected_payment_methods option
    $selected_payment_methods = get_option('cfturnstile_selected_payment_methods', array());
    if(is_array($selected_payment_methods)) {
    // Check if the chosen payment method is in the selected payment methods array
    if ( in_array( $chosen_payment_method, $selected_payment_methods, true ) ) {
    $skip = 1;
    }
    }
    if ( 'stripe' == $chosen_payment_method && isset($_POST['payment_request_type']) ) {
    $stripe_payment_request_type = sanitize_text_field( $_POST['payment_request_type'] );
    if ( 'apple_pay' == $stripe_payment_request_type ) {
    $skip = 1;
    }
    }

Viewing 1 replies (of 1 total)
  • Thread Starter Chad Barretta

    (@chadbarretta)

    The reason I ask is because of a questionable bug? It seems that when a user is checking out with apple pay as a guest, they are receiving an error “Please verify that you are human.” after the apple pay processing is done, even though the turnstile had the green check prior to the apple pay submission. So I’ve added the apple_pay bypass as a quick fix.

Viewing 1 replies (of 1 total)

The topic ‘Bypass specific WooCommerce payment_request_type’ is closed to new replies.