Questions tagged [woocommerce-checkout-fields]

26 questions
9
votes
3 answers

Custom placeholder for all WooCommerce checkout fields

I am trying to add a placeholder to my WooCommerce checkout fields, and it's working perfectly for every field except for the phone and the email fields. This is the code I am using: add_filter('woocommerce_default_address_fields',…
5
votes
1 answer

Customized Woocommerce checkout fields reverting to default after page load

I have renamed the "shipping_country" label of my woocommerce checkout page successfully using this code: add_filter( 'woocommerce_checkout_fields', 'rename_woo_checkout_fields' ); function rename_woo_checkout_fields( $fields ) { …
3
votes
1 answer

Woocommerce how to set default_checkout_billing_country only if user is not logged in

I have this function and I only want to set the billing country if user is a guest, otherwise we should not change the billing country, but instead take the billing country as what the user has in his profile in WooCommerce. add_filter(…
3
votes
1 answer

WooCommerce: Add a birthdate billing field in checkout, My account, admin orders and WordPress user

I try to add a birthdate field in the Woocommerce Checkout form, then save it as a user meta. I can display it with the code below but i can't save it in order to see it in the user profile page. add_filter( 'woocommerce_billing_fields',…
2
votes
2 answers

Hide shipping methods if a virtual product is in the cart

If a woocommerce cart has a virtual item only it does not show shipping methods. I have a unique situation where I'd like this to be the case also if the cart contains physical products but at least one virtual product (ie any virtual product in the…
2
votes
0 answers

how to show calculated value in backend on woocommerce checkout page

I'm creating an online store for my company which is a subsidiary of a bank. With the help of banking loan we want to build the infrastructure of selling goods via installment. By using this plugin I managed to add a select field which let the buyer…
2
votes
1 answer

How to remove all Woocommerce checkout billing fields without errors

That action helps to make fields non-required add_filter( 'woocommerce_checkout_fields', 'unrequire_checkout_fields' ); function unrequire_checkout_fields( $fields ) { $fields['billing']['billing_company']['required'] = false; …
1
vote
0 answers

woocommerce order-pay page redirect back to checkout

I have a problem with woocommerce checkout page. when user field all items in the checkout form and submit form to go for payment it redirects to current page. also when I check in network xhr requests I see that it successfully…
1
vote
1 answer

Move T&C above payments methods in woocommerce

I am trying to move the Terms and Conditions above the payment methods options. I tried couple of snippets I found here, but no luck, as most of them moves the payment methods above the order summry, but what am trying to achieve is: Also I remove…
1
vote
0 answers

WooCommerce wrap custom checkout fields in a div

Hi to all in my plugin I added custom fields to WooCommerce checkout: add_action('woocommerce_checkout_fields', 'my_custom_billing_fields', 10, 1); function my_custom_billing_fields($fields) { $fields['billing']['billing_checkbox'] = array( …
crazypen
  • 41
  • 5
1
vote
0 answers

Woocommerce checkout remove-delete unknown required checkbox field

I'm using the latest woocommerce and flatsome theme. There is a visible-required field during guest checkout so i can't find a way to delete-disable this even with Checkout Field Editor (Checkout Manager) plugin. As a temporary workaround, i've…
1
vote
1 answer

Check if Fiscal Code already exists during Checkout [WOOCOMMERCE]

Good morning everybody, I'm trying to introduce a fiscal code verification during my checkout. The verification is similar to what Wordpress does with email. I created a similar "email_exists()" function to check if the fiscal code in the order…
1
vote
0 answers

Hide Order Total from Woocommerce Checkout

I'm trying to hide the "order-total" section from my checkout if the total is 0.00€ (see [Pic here][1] for reference). I tried to add a condition to the code (as you can see below) I found suggested here: How to remove order total from cart and…
1
vote
1 answer

How to set class property inside 'woocommerce_after_order_notes' and then use it inside 'woocommerce_checkout_process'?

I need to create validation for dynamically created fields on the checkout page. class Myclass () { private $_active_fields; public function generate_fields () { /** /* Some previous logic to create an $items array based…
0
votes
0 answers

How to make Eircode/postcode a required field in woocommerce checkout

Looking to make the Eircode/Postcode field on the woocommerce checkout page mandatatory with the red astrisks beside it just like it is for the other fields. This is because we ship to Ireland and some couriers won't accept the order without an…
1
2