• Resolved danishfareed

    (@danishfareed)


    Dear users,

    I’m facing issues with required mandatory fields on the manually generated orders page (payment link through email).

    WooCommerce scenario: an order is created by admin. This order’s payment link is sent by email to the customer to pay.

    Link like this:

    https://asad.app/checkout/order-pay/3566/?pay_for_order=true&key=wc_order_PIBMN20X3Jank

    The problem is that when I’m trying to proceed with the payment it says

    “Sorry, there was an error: The field Address is mandatory., The field City Name is mandatory.”

    My question is, there are no user entry fields on this page then why it is showing mandatory fields required. FYI this is working fine on chrome browsers(desktop only) but when the same link is accessed from chrome mobile or safari the error shows up. above give link is the working link, kindly assist me here.

    I’m not using any kind of plugin to manage checkout fields.
    This feels strange as there are no fields on the page but it still shows the required fields error.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter danishfareed

    (@danishfareed)

    I tried adding this code to disable the fields if any on the order-pay page but it didn’t work out

    add_filter( ‘woocommerce_billing_fields’, ‘wc_npr_filter_phone’, 10, 1 );
    function wc_npr_filter_phone( $address_fields ) {
    if ( is_checkout() && ! is_wc_endpoint_url( ‘order-pay’ ) ) {
    $address_fields[‘billing_phone’][‘required’] = false;
    $address_fields[‘billing_state’][‘required’] = false;
    $address_fields[‘billing_postcode’][‘required’] = false;
    $address_fields[‘billing_country’][‘required’] = false;
    $address_fields[‘shipping_address_1’][‘required’] = false;
    $address_fields[‘shipping_city’][‘required’] = false;
    $address_fields[‘shipping_state’][‘required’] = false;
    $address_fields[‘shipping_postcode’][‘required’] = false;
    $address_fields[‘billing_address_1’][‘required’] = false;
    $address_fields[‘billing_city’][‘required’] = false;
    return $address_fields;
    }

    }

    Plugin Support Ross V. a11n

    (@rossviviano)

    Automattic Happiness Engineer

    Hi there,

    It looks like something is conflicting with WooCommerce here. To test, first, you’ll want to change the theme on your site to Storefront, then test. If that resolves the issue, you’ll want to get in touch with your theme’s developer and see if they have an update or fix for you. If changing the theme doesn’t help, you’ll want to deactivate all plugins except for WooCommerce and take a look. If that fixes the problem, re-enable the other plugins one by one to see where the issue is coming from. If you don’t want to test on your live site, then create a staging site using a plugin called WP Staging.

    Best,

    Ross

    Plugin Support Ross V. a11n

    (@rossviviano)

    Automattic Happiness Engineer

    Hi again,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions!

    Best,

    Ross

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mandatory Fields Error on Manual order pay page – WooCommerce’ is closed to new replies.