Home › Forums › WoodMart support forum › Checkout Fields – Compatibility with YITH Point of Sale – VAT Number Field
Checkout Fields – Compatibility with YITH Point of Sale – VAT Number Field
- This topic has 8 replies, 2 voices, and was last updated 4 months, 3 weeks ago by Artem Temos.
-
AuthorPosts
-
July 9, 2024 at 2:03 pm #582101
Jeriss Cloud CenterParticipantReopening the below ticket :
Please check the screenshot attached where you’ll see the reply from YITH Support Team.
Both WoodMart and YITH are sending the problem back to each other.
Attachments:
You must be logged in to view attached files.July 9, 2024 at 2:33 pm #582121
Artem TemosKeymasterHello,
We also use the same hook, but it still doesn’t work. Did you test how it works with other checkout field editor plugins?
Kind Regards
July 9, 2024 at 2:45 pm #582128
Jeriss Cloud CenterParticipantI’m not using any other plugin. I’m using only your WoodMart checkout editor.
And even if I use other plugins, it doesnt make any point because it’s something not provided by default in WordPress and WooCommerce.
Usually you always ask us to try with default install, which we do. But here trying with other systems doesnt make sense because it’s a third-party customization.
So please contact YITH support because you are both rejecting responsability, but someone has to fix something in here.
July 9, 2024 at 3:22 pm #582147
Artem TemosKeymasterIn this case, we can mark this plugin as incompatible with our checkout manager as it doesn’t work with this mechanism in general. We can’t do anything in our theme’s code to fix this. The issue seems to be a conflict that arises from the way the YITH Point of Sale plugin and all checkout fields managers.
July 9, 2024 at 11:35 pm #582218
Jeriss Cloud CenterParticipantI’ve just tested the below free plugin Checkout Fields Editor :
https://fr.wordpress.org/plugins/checkout-field-editor-and-manager-for-woocommerce/And this FREE plugin is perfectly capable of detecting the “VAT Number” field from YITH Point of Sale.
So if this plugin can do it, then WoodMart Checkout Fields editor can do it.
Look at the staging below.
Attachments:
You must be logged in to view attached files.July 12, 2024 at 12:32 pm #582902
Artem TemosKeymasterTo fix this issue, you need to edit the file
wp-content\themes\woodmart\inc\integrations\woocommerce\modules\checkout-fields\class-helper.php
and add the line as shown on the screenshot https://monosnap.com/file/lIVsLcC1aSWVMIQ7nQbnFEwtuxQHaj$fields = apply_filters( 'woodmart_default_checkout_fields', $fields, $current_tab );
After this, add the following snippet to the functions.php file in your child theme
add_filter( 'woodmart_default_checkout_fields', function ( $fields ) { if ( ! function_exists( 'yith_pos_get_vat_field_label' ) ) { return $fields; } $fields['billing']['billing_vat'] = array( 'field_name' => 'billing_vat', 'label' => yith_pos_get_vat_field_label(), 'description' => '', 'required' => false, 'status' => 'yes' === get_option( 'yith_pos_show_vat_field_on_frontend', 'yes' ), 'type' => 'text', 'class' => array( 'form-row-wide' ), 'priority' => 35, ); return $fields; } );
Now you need to reset all the configurations to the default and configure it from scratch.
July 12, 2024 at 1:04 pm #582913
Jeriss Cloud CenterParticipantSo this code will go in my functions.php for now, but afterwards you will add this by default in your theme right?
- This reply was modified 4 months, 3 weeks ago by Jeriss Cloud Center.
July 12, 2024 at 1:16 pm #582921
Jeriss Cloud CenterParticipantThe code works fine now. But please integrate this by default in your theme in next release.
July 12, 2024 at 2:40 pm #582944
Artem TemosKeymasterWe will add the filter to our theme’s code, but you will need to keep the code in the child theme anyway.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register