Forum Replies Created

Viewing 9 replies - 16 through 24 (of 24 total)
  • Plugin Author Mohamed Endisha

    (@endisha)

    @renevdlinden

    Check the plugin settings. If _billing_phone is enabled and the field is blank or invalid in the order details, the order update will not be sent. Try disabling the field (Enabled) or (Frontend Validation) to allow blank or invalid phone numbers.

    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.

    Plugin Author Mohamed Endisha

    (@endisha)

    Editing the plugin code is not recommended. Instead, you should use hooks to override the function. Look for a hook that runs before your desired action and use it to override and update the phone number exactly where you need to.

    If the plugin works well for you, please consider leaving a positive review.

    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.

    Plugin Author Mohamed Endisha

    (@endisha)

    @xoutor

    I think this needs some clarification. Is it a custom payment method that uses a custom field or the checkout billing phone number? Also, when do you want to save it—after processing the order?

    For example, my country code is +218[XXXXXXX] and i will remove +218. I can update the billing phone number (or custom field) after the order is processed and save the new field using the WooCommerce woocommerce_checkout_update_order_meta hook, something like the following:

    add_action('woocommerce_checkout_update_order_meta', function ($order_id) {
    $phone = get_post_meta($order_id, '_billing_phone', true);
    if ($phone) {
    // Remove the country code, the +, and the first three digits.
    $phone_without_country_code = preg_replace('/^\+\d{1,3}\s?/', '', $phone);
    // Update the order meta with the modified phone number by update _billing_phone.
    update_post_meta($order_id, '_billing_phone', $phone_without_country_code);

    // or update the payment method phone number if it uses another field.
    //update_post_meta($order_id, 'custom_field', $phone_without_country_code);
    }
    });

    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;
    });
    Plugin Author Mohamed Endisha

    (@endisha)

    @bing4

    Unfortunately, This plugin is specialized in determining the customer’s location on the map, not the products.

    Plugin Author Mohamed Endisha

    (@endisha)

    Hello Sven

    The plugin does not modify the email sender. By default, WordPress uses “wordpress@yourdomain” as the sender email for all outgoing emails. If you want to customize the sender email address, you can use the following code snippet:

    function custom_email_from( $email ) {
      return '[email protected]';
    }
    add_filter( 'wp_mail_from', 'custom_email_from' );

    However, I would recommend using SMTP for emails instead of relying on the default WordPress email function. SMTP can improve email deliverability and ensure that your emails are not marked as spam.

    Plugin Author Mohamed Endisha

    (@endisha)

    Hello @tomdhu

    Agora abandoned carts plugin works only with logged-in customers.
    about IP address, Yes we can added it

Viewing 9 replies - 16 through 24 (of 24 total)