Mohamed Endisha
Forum Replies Created
-
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 Settings: https://ibb.co/DCPRT6C
- Edit Order: https://ibb.co/ypRqLqh
Forum: Plugins
In reply to: [International Phone Number Format] Compatibility with YITH Point of SaleIt 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.
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.
Forum: Plugins
In reply to: [International Phone Number Format] Compatibility with YITH Point of SaleThank 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.
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);
}
});Forum: Plugins
In reply to: [International Phone Number Format] Compatibility with YITH Point of SaleUnfortunately, 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;
});Forum: Plugins
In reply to: [Map for WooCommerce] Product on mapUnfortunately, This plugin is specialized in determining the customer’s location on the map, not the products.
Forum: Plugins
In reply to: [Asynchronous Emails] Email senderHello 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.
Forum: Plugins
In reply to: [Agora Abandoned Cart] Collect IP at Cart pageHello @tomdhu
Agora abandoned carts plugin works only with logged-in customers.
about IP address, Yes we can added it