• Resolved kelliedp

    (@kelliedp)


    Hi there

    I am getting orders not processing through Apple Pay using this plugin with a red error coming up on the check out page ‘shipping phone is a required field”. I have confirmed using my own details that I have the phone number attached to my Apple Pay account and when I try to submit an order myself it is still failing with this error.

    We require the phone number, so I cannot make the field optional for customers to fill in or not – and is required for the postal services also.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @kelliedp!

    I understand the issue you’re experiencing with Apple Pay orders failing at checkout with the “shipping phone is a required field” error, even though a phone number is already associated with your Apple Pay details.

    As a first step, please make sure there are no empty spaces or special characters in the phone number. For testing, please enter the phone number using numbers only, without any hyphens (-) or spaces.

    Also, for testing purposes, could you temporarily set the Billing Phone field as required and the Shipping Phone field as optional, then test an Apple Pay order to see whether this makes any difference?

    In the meantime, please share the following so we can investigate further:

    • System Status Report: WooCommerce → Status → Get system report
    • Fatal Error Logs: WooCommerce → Status → Logs → select the relevant fatal-error log

    You can share both through Pastebin. Please enable the “Burn after read” option when creating the Pastebin.

    Thank you for your cooperation and understanding.

    Thread Starter kelliedp

    (@kelliedp)

    Hi

    Thank you for the reply.

    I have loaded the system status report and a copy of the debugger via PasteBin for one of the attempts I made earlier – however it doesn’t seem to show much.

    I do not have any options on my store to have the billing phone number only compared to the shipping phone number. I’m unsure if I am missing something here somewhere?

    Thanks

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @kelliedp

    You’re not missing anything. WooCommerce has one phone setting that controls both the billing and shipping phone fields, so there’s no way to keep one required and make the other optional. Sorry about that earlier test step.

    I reproduced this on a test site with Square 5.5.0, and it’s a bug in the Square plugin. When a customer pays with Apple Pay, the phone number from the wallet only goes into the billing phone field, so WooCommerce rejects the order with “Shipping Phone is a required field”. I’ve added your report to the bug our development team is tracking. I don’t have an ETA at the moment, but the fix will be included in a future update.

    Until then, this snippet copies the billing phone into the shipping phone for Square wallet payments, so the order goes through with the number saved on it. Custom code is outside our support scope, so I’m sharing it as a goodwill gesture. You can add it with a plugin like WPCode or in your child theme’s functions.php file.

    // Provided by Woo Support on 2026-09-06
    // Purpose: Copy the billing phone into the shipping phone for Square Apple Pay and Google Pay orders so the required shipping phone check passes.
    // Contact: support@woocommerce.com

    add_filter( 'woocommerce_checkout_posted_data', function ( $data ) {
    $is_square_wallet = isset( $_POST['wc-square-digital-wallet-type'] ) && '' !== $_POST['wc-square-digital-wallet-type']; // phpcs:ignore WordPress.Security.NonceVerification.Missing

    if ( $is_square_wallet && empty( $data['shipping_phone'] ) && ! empty( $data['billing_phone'] ) ) {
    $data['shipping_phone'] = $data['billing_phone'];
    }

    return $data;
    }, 20 );

    Please note that even though we’re happy to share snippets like this one, only core features are supported, so we aren’t in a position to troubleshoot conflicts that may come up with a custom snippet or modify it further. If you need more help with customizations, I’d recommend reaching out to Codeable. They’re our official development partner and have vetted WooCommerce specialists.

    Can you please add the snippet and run one Apple Pay test order? If it goes through, let me know here, and I’ll mark the thread as resolved.

    Thread Starter kelliedp

    (@kelliedp)

    Thank you! I will test it as soon as I can! Appreciate the prompt responses and assistance 🙂

    Plugin Support Zain-a11n

    (@za12bt)

    Hi @kelliedp 🙂

    Did you get a chance to try the suggested solution?

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.