trongtien88
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Remove fields on Edit AddressHi Murray,
Honestly, I don’t know much about these coding stuff. But I think you don’t need to use the code that you posted.
You can see my example below:
add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ );
function custom_override_checkout_fields( $fields ) {
unset($fields[‘billing’][‘billing_address_2’]);
unset($fields[‘billing’][‘billing_postcode’]);
unset($fields[‘billing’][‘billing_company’]);
unset($fields[‘billing’][‘billing_last_name’]);
unset($fields[‘billing’][‘billing_city’]);return $fields;
}I put the code above into functions.php in oder to remove these fields: address 2, postcode, company last name, city/town on the checkout page. Hope you can do like mine.
Forum: Plugins
In reply to: [WooCommerce] Remove fields on Edit AddressHi Nathalie
Thank you for your response. But I’m afraid that you misunderstood my question. I’m sorry if my previous explanation is too bad.
I will give you more details this time. I used woocommerce plugin for setting up shop on my website. Woocommerce plugin allows customers to register on my website and buying stuff. Registered customers can edit their billing/shipping address info in their account dashboard. The default billing/shipping info include these fields: First Name, Last name, Company, Adddress 1&2, Phone, Email, Country, City/State. Now I want to remove some fields such as Address 2 and Company.
This tutorial show me how to remove these fields on Check Out page: https://wcdocs.woothemes.com/snippets/tutorial-customising-checkout-fields-using-hooks-and-filters/
And I successfully removed Address 2 and Company fields on Check Out page. But it doesn’t work on the Edit Address page.Therefore, how can I remove these fields on Edit Address page like I did on Check Out page?