Hi @xxjack189,
I really recommend you start by reviewing this support documentation on customizing checkout fields:
https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
But from what I know of PHP, you should be able to disable this with the combination of a free customization plugin and the code below. I recommend downloading the https://ww.wp.xz.cn/plugins/code-snippets/ plugin first then adding the code below to run on the front-end
/**
* xxxxxx FUNCTION TO MAKE CHECKOUT FIELDS OPTIONAL
*/
add_filter( 'woocommerce_billing_fields', 'wc_optional_billing_fields', 10, 1 );
function wc_optional_billing_fields( $address_fields ) {
$address_fields['billing_address_2']['required'] = false;
$address_fields['billing_postcode']['required'] = false;
return $address_fields;
}
add_filter( 'woocommerce_shipping_fields', 'wc_optional_shipping_fields', 10, 1 );
function wc_optional_shipping_fields( $address_fields ) {
$address_fields['shipping_address_2']['required'] = false;
$address_fields['shipping_postcode']['required'] = false;
return $address_fields;
}
Please ensure you have a recent backup of your site before making any changes like this. Also, please keep your site’s plugin page open in a separate tab when adding the code to the Code Snippets plugin. If it breaks your site you should still be able to open that tab with your plugins page to deactivate that plugin if it crashes the site. This is a very, very unlikely scenario but I don’t know what your site configuration looks like so there’s always a bit of risk when implementing any code.
Please let me know how this works out for you.
Thanks!
Hi,
Philip, thank you for the suggestion. Unfortunately, the error still persists “Billing Eircode is not valid. You can look up the correct Eircode here” on PayPal checkout.”
It’s not the end of the world, just thought it might be an easy fix.
Thanks again.
Okay, thank you for letting me know about this. I’m going to mark this as resolved – if you have any further questions, you can start a new thread.
Thanks!