wpseriouslee
Forum Replies Created
-
Setting a shop base address did not change anything, the error is still there and I suppose this might just have to be the workaround for now. I get that the customer has to fill in the country and it might interfere with some plugins but my client is adamant about not wanting that field there and now here I sit.
The best workaround I can find to allow hiding the country field and still be able to edit billing and shipping addresses is to add this to the form-edit-address.php file
<input type="hidden" name="billing_country" value="GB" />
<input type="hidden" name="shipping_country" value="GB" />
But is this acceptable?
Conflict testing did not prove fruitful, so I went for some good old log based debugging, turns out I’m hitting this line
https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-form-handler.php#L92
EDIT: Asked a stupid question, removed it; new question, is there a way I can set the default country to be sent in the payload when I edit address?
- This reply was modified 4 years, 6 months ago by wpseriouslee.
Sorry, I hadn’t seen your reply, I will try this conflict testing and see where it takes me; thank you
Quick note, I’ve set display none on the errors at the top of the form and even though I expect errors when I try to submit an empty form, I see nothing there, only until I remove unset shipping/billing country depending on which address I want to add/edit