Skip to content

Instantly share code, notes, and snippets.

@pavlo-bondarchuk
Created April 7, 2017 06:49
Show Gist options
  • Select an option

  • Save pavlo-bondarchuk/0cb0ea6be67798e1c1edbf807451c78d to your computer and use it in GitHub Desktop.

Select an option

Save pavlo-bondarchuk/0cb0ea6be67798e1c1edbf807451c78d to your computer and use it in GitHub Desktop.
переписать woocommerce_checkout_fields
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields['order']['order_comments']['placeholder'] = 'My new placeholder';
return $fields;
}
Billing
billing_first_name
billing_last_name
billing_company
billing_address_1
billing_address_2
billing_city
billing_postcode
billing_country
billing_state
billing_email
billing_phone
Shipping
shipping_first_name
shipping_last_name
shipping_company
shipping_address_1
shipping_address_2
shipping_city
shipping_postcode
shipping_country
shipping_state
Account
account_username
account_password
account_password-2
Order
order_comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment