0

I'm trying to add custom fields to the "Address" area, in the YITH POS for the WooCommerce plugin.

I know this is a commercial plugin. I've tried contacting support, but they are very slow. I'm just trying to locate the original location of the current fields, so I can modify it as I find it suitable.

Please check this (Screenshot) & this one (Screenshot)

You can access the pos system interface from this link: https://rightmass.com/pos/

I've tried adding custom fields into the woocommerce checkout page by using the following code, hoping it would work, on this plugin, too - but it didn't work.

// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );

// Add custom fields to shipping area
function custom_override_checkout_fields( $fields ) {
$fields['shipping']['shipping_phone'] = array(
    'label'     => __('New Custom Field', 'woocommerce'),
'placeholder'   => _x('New Custom Field', 'placeholder', 'woocommerce'),
'required'  => false,
'class'     => array('form-row-wide'),
'clear'     => true
 );

 return $fields;
 }
Usama Shabbier
  • 164
  • 1
  • 11
  • 1
    Try to use instead `woocommerce_billing_fields` hook like in: https://stackoverflow.com/questions/57729859/customize-addresses-fields-on-woocommerce-my-account-and-checkout/57730215#57730215, it may work… When using this hook the field is also displayed in may account addresses and doesn't require validation and it's auto saved on submit normally if I am not wrong.… See also this thread too: https://stackoverflow.com/questions/63235335/custom-vat-field-issue-in-woocommerce/63235951#63235951… – LoicTheAztec Aug 04 '20 at 02:13
  • @LoicTheAztec Thank you for your valuable comment. I tried using woocommerce_billing_fields, i can see the fields in my account page, but it is not reflecting in the adress area on the point of sale page. Screenshot: http://prntscr.com/ttj4y2 If you would like to test the plugin, on your demo domain, feel free to download it from here: https://drive.google.com/file/d/1OiPtNSAFvV45FD7_cLSacwjbwlDqX_0i/view?usp=sharing – Usama Shabbier Aug 04 '20 at 06:11

0 Answers0