horgster
Forum Replies Created
-
@iverok
Thanks 🙂Hi @iverok
Thanks, this works as expected🤗
Does that I mean, that I also should update this part of my code for Login for VIPPS/** Removes Country Code from VIPPS Login Plugin */add_filter('login_with_vipps_woo_phone_number', function ($phoneno, $customer, $userinfo) {
if (!preg_match("!^47!", $phoneno)) return $phoneno;
if (strlen($phoneno) < 10) return $phoneno;
error_log("Removing phoneno");
return substr($phoneno,2);
}, 10, 3);
I am running these two filters in a same custom plugin, like this:/** Removes Country Code from VIPPS Login Plugin */
add_filter('login_with_vipps_woo_phone_number', function ($phoneno, $customer, $userinfo) {
if (!preg_match("!^47!", $phoneno)) return $phoneno;
if (strlen($phoneno) < 10) return $phoneno;
error_log("Removing phoneno");
return substr($phoneno,2);
}, 10, 3);
/** Removes Country Code from VIPPS Checkout/Express Checkout */
add_filter('woo_vipps_canonicalize_checkout_address', function ($address, $user) {
$phoneno = $address['phoneNumber'] ?? "";
if (!preg_match("!^47!", $phoneno)) return $address;
if (strlen($phoneno) < 10) return $address;
$fixed = substr($phoneno,2);
$address['phoneNumber'] = $fixed;
$address['mobileNumber'] = $fixed;
error_log("Checkout: Removing prefix from phone, using $fixed");
return $address;
}, 10, 2);- This reply was modified 5 months, 2 weeks ago by horgster.
Perfect! It works and thinks for your kind support 🙂
Case closedHi @iverok
Great and thanks for quick support as always 🙂
But we have an critical bug here!
After upgrading to 5.0.13, the express checkout is no longer working.
We can’t initiate VIPPS payment with Express checkout, when pressing “Betal med Vipps” button during express checkout after the “sales conditions” is confirmed.
If I select an product and select, pay now with VIPPS, I am redirected to “VIPPS Hurtigasse” https://www.oslokiteklubb.no/vipps-buy-product, but when I then press “Betal med VIPPS”, the VIPPS page is not opened.
I was forced to rollback to version 5.0.12 to get VIPPS payment to work again.
Let me know if I can assist in troubleshooting?Perfect!
Hi,
This morning I tested following two scenarios:
Scenario 1- Purchased a product with the value of 5 kr
- Refunded 1kr manually with the manual button
VIPPS Gateway was not engaged at this time. - Changed the order status to “Refunded”
VIPPS Gateway engaged – and 5kr was refunded
Scenario 2
- Purchased a product with the value of 5 kr
- Refunded 1kr manually with the manual button
VIPPS Gateway was not engaged at this time. - Refunded the remaining 4kr manually
VIPPS Gateway engaged – and 5kr was refunded
This concludes that refunding *part* of the order until all founds is refunded manually do not work either.
So yes, I think it is important that logic should be changed here.Hi @iverok
As said;
It is triggered if pressing the “Button refund manually” or if you just change the status of the complete order to “refunded”.
So I guess, when you press the button “refund manually” it also sets the order to “refunded” which in return gets the gateway called.
Hope this answer your question and helps you 🙂Hi @iverok
Thanks for quick response.
The entire process that I did:
1. Opened the order by editing it.
2. Pressed “Refund” and selected the product to be refunded.
3. Pressed the “Button” Refund kr xx manually (not the “Refund xx kr via Vipps MobilePay” button)
4. This triggered the order to be refunded to Vipps.I also tested on another separate test order:
1. Edited an order
2. In Order Status, I selected “Refunded” and updated the order.
This also triggered full refund via the VIPPS Gateway as you mentioned above.
Best Regards
Horgster- This reply was modified 5 months, 4 weeks ago by horgster.
Hi @gandomi
Thank you for quick response and detailed explenation.
Assume that these 10 errors also includes following error types; warnings, deprecated as well, or will it only keep the Error type?
Bear in mind that many wordpress sites will have lots of “deprecated” error types due to plugins / themes etc that yet is not updated. This will continuously keeping writing unnecessary traffic to the the autoloader. Our ISP has requested us to avoid this as much as possible.Being able to debug is important, but I think you should add an option /check box to allow the user to enable / disable this feature when needed. This feature has more value when you need to debug rather than keeping it logging and writing to the autoloader each time a page is loaded.
We have often release of ticket sales to our event, causing severe high peak traffic, and such will contribute to avoid unnecessary traffic and reduce the load.
Allow the customer to decide if they want this feature on or off. Don’t you agree?
Best Regards
Horgster
Hi @gandomi
Thank you very much for this update and quick service!
In the release notes; it states “Prevented
wp_statistics_tracker_js_errorsoption bloat by limiting stored errors and truncating error messages.”What has been fixed here, as it states “limiting” errors, does that mean that we will still posted error messages in the autoloader?
Hi @gandomi
Thank you very much for taking this issue seriously and for the quick response.
Looking forward for update when new version is ready.
Best Regards
HorgsterHi,
I would also like to address that the “WP Statistics” plugin should at no circumstances logs deprecated warnings of other plugins/themes unless you really need it into the wp_options table!!
There should also be implemented an sensible size limit and frequency limit incase you need to debug this. Please set this to “disabled” be default, and add these options in the General Settings page of the debugger to enable these features when needed!!
In complicated WordPress installations will always time to time have deprecated functions and logging this is unnecessary unless debugging is really needed.
I have added an temporary filteradd_filter(‘wp_statistics_disable_tracker_debugger_logs’, function () {
return true; // Disables tracker debugger error logging
});
Please fix this!
Forum: Plugins
In reply to: [Login with Vipps and MobilePay] Remove Contry CodeThanks @iverok
I have tested this and it works, prefect!
Once again, thanks for your great support as always!Forum: Plugins
In reply to: [Login with Vipps and MobilePay] Remove Contry CodeForum: Plugins
In reply to: [Login with Vipps and MobilePay] Remove Contry CodeHi @iverok
Thanks for helping out!
This filter also worked for existing and new customers using “VIPPS Express Checkout” until now for some reason. I can see that order on a existing customer has phone 4712345678, but the user account (already customer) has phone 1234567.
This filter also worked for new users.
On new customers, I can see that when using “VIPPS Express Checkout” do not automatically link “Login with VIPPS” as it did before. That is perhaps new now since Login with VIPPS is not free anymore.
The order is registered with 4712345678, and the new customer has phone 12345678
Will the filter “woo_vipps_express_checkout_new_customer” apply to all express checkout orders?