Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mohamed Endisha

    (@endisha)

    @jeriss

    Unfortunately, the YITH Point of Sale is available only in the premium version, and I cannot access the source code to assist you precisely with this issue. However, it is doable if you follow these steps:

    Add the custom field using the intl_phone_number_format_fields filter. Here’s an example code snippet:

    <?php
    add_filter('intl_phone_number_format_fields', function ($fields){
    $fields[] = array(
    'id' => 'mobile',
    'enable' => true,
    'desc' => 'Mobile phone number on the customer page',
    'label' => 'Mobile',
    'frontend_validation' => true, // JS frontend validation
    'backend_validation' => true, // Backend validation
    'countries' => 'all', // Countries related to fields (all, billing, or shipping)
    'type' => 'custom', // Field type (custom, billing, or shipping)
    );
    return $fields;
    });

    The id should be similar to the phone number field in the “Create Customer” page. You can inspect the input element to get the input ID.

    To include the International Phone Number Format JS files on that page, you need to know the exact page and apply this hook., you can include it using the following method:

    <?php
    add_filter('intl_phone_number_format_validate_enqueue_js', function ($valid){
    // Your condition here, check page URL to detect the "create customer" page.

    // if (create customer page)
    // $valid = true;


    return $valid;
    });
    Thread Starter Jeriss Cloud Center

    (@jeriss)

    Hey, thanks for your reply. I can provide you a staging where you’d check the plugin. Is there any email in which I can send you staging access ? Thanks

    Plugin Author Mohamed Endisha

    (@endisha)

    Thank you for your offer to provide staging access, I must inform you that custom support is not provided as part of my plugin. If you have any specific questions or need assistance with the plugin, please feel free to let me know, and I’ll be happy to help within the scope of our standard support.

    Thank you for your understanding.

    Thread Starter Jeriss Cloud Center

    (@jeriss)

    Ok can you just check the screenshot below, and help me identify which is the “ID” you said.

    https://jeriss.tinytake.com/msc/OTgyNDc4NV8yMzQ3NTgwOA

    Plugin Author Mohamed Endisha

    (@endisha)

    @jeriss

    It seems the YITH Point of Sale might be using a different method, such as VueJS – SPA, etc.., instead of the default WordPress. Please contact the developers of the YITH Point of Sale plugin for assistance. If they are using a custom approach, the plugin might not function properly in your case.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.