robertrosanke
Forum Replies Created
-
Hello @karlalevelup ,
Thank you for your feedback.
It appears that Stripe had an incompatibility/minor error. Other users also reported this to Stripe, and the error has been fixed with the 9.9.2 update. I can confirm your observations. The ticket can be closed.Thank you very much for your support. Have a great week!
Hello @mosesmedh ,
We tested the update to 9.9.2 today and it fixes the display issues. Thank you very much for your quick response and the speedy update by the plugin developers.
Have a great week!
Hello Frank,
Thank you for your feedback. In the meantime, we have simply added a span tag with the screen reader text CSS class. The text content survives the wp_strip_all_tags function.
I will not be creating a GitHub issue. Since the problem has already been solved, I won’t burden my client with additional costs just to create a GitHub ticket and possibly manage it. What’s in this wordpress.org ticket is probably pretty clear. If you want to use it, go ahead. If not, then don’t.
Thanks a lot for your support!
Hello Sai,
Thank you for your response and patience!
We have reconnected Stripe and there do not appear to be any issues at first glance.
The communication in the UI was somewhat misleading. When I disconnect an account, the plugin tells me that I need a new Stripe account if I want to reconnect. Perhaps you could improve the wording for the disconnect/reconnect process to better support users during this procedure.
The ticket can be closed. Thanks for your help.
Hello Frank,
Thank you for the detailed explanations.
I will now have my customers disconnect their accounts and then reconnect them. Let’s see what happens.
I don’t actually see “Dynamically display the most relevant activated payment methods” in the place you show me in the screenshot (https://snipboard.io/kCRe3K.jpg).
When I think about it, it might make sense that I don’t see this setting. We currently only have credit cards via Stripe activated.
We deactivated PayPal/Apple Pay because there was a conflict with PayPal for WooCommerce some time ago.
I’ll give an update tomorrow on whether everything is OK and we can close the ticket or not.
Forum: Plugins
In reply to: [Klarna for WooCommerce] klarna loads on every pageHello Klarna team,
We would like to join this topic.
We have identified the same problem.klarnapayments-jsseems to be a dependency ofklarna_interoperability_token-js. So it should be enough to remove this one script.Is it safe to apply
wp_dequeue_script( ‘klarna_interoperability_token’ );via PHP code to all non-checkout pages?This should solve the problem if no express checkout is enabled.
(The code is not tested. Only found out by code review –wp-content/plugins/klarna-payments-for-woocommerce/classes/class-kp-assets.php).We look forward to your feedback.
A basic plugin optimization would certainly also be desirable in the future.(Stripe, for example, provides a php filter so that developers can exclude all product pages from the overloaded js.)
Hi @doublezed2 .
Thank you for your answer.
I have now submitted a feature request.
Anyone who would like to support this with an upvote is welcome to do so: https://woocommerce.com/feature-request/performance-caching-of-product-pages-with-preselected-product-variant/Hello @klarna ,
thanks for the update.
A cronjob could probably help us, yes.
But I don’t understand why every store owner who wants to use Klarna via your plugin has to program it manually.An out of the box solution should be much more efficient and valuable for your customers.
For example, you could add a function in the plugin settings: Automatically set orders to “failed” after x hours. Anyone who activates this option already knows why they are doing so, and that’s the end of the matter.
You could also create an entry in the order notes that informs the shop operator that the order has automatically been set to failed because Klarna has not given the green light for x hours.That’s the end of the matter, without adding manual effort for every store operator.
To be honest, I was confused about the link you showed (https://docs.krokedil.com/krokedil-general-support-info/pending-payment-orders-and-held-stock/).
I don’t like what the “Changed pending payment orders” section says about creating multiple orders for just one customer.
Earlier in this thread I described how PayPal, for example, simply sends the user back to the checkout if you cancel in the PayPal popup and there are not multiple orders in the system for this one customer.
Especially if you want to automate processes, in this case e.g. the payment reminder in case of problems, it worries me that a customer with one checkout process may have two orders in the WooComerce system.The “second order” may go through as paid, while the “first”, pending order is then set to failed by the cronjob and the customer receives a message that the payment has failed and they should pay again.
I can hardly tell my customer, for whom I’m writing this thread, about this behavior without him thinking I’m joking.
It’s not meant to be malicious. It’s more like honest feedback so that we can initiate improvements together.
I also have customers who wouldn’t care about the behavior because they only have a few orders and process them manually.
However, anyone who relies on reliable automation is probably not satisfied with the current situation. It seems immature compared to other payment solutions for WooCommerce (PayPal, Stripe).
Hi @louisekrokedil .
I’m not sure whether I understood the rather diplomatically written message correctly.
What I did understand:
- you no longer want to set the order status to “failed” yourself in future and reverse the newly introduced change
- you also want to reintroduce the old, very unsatisfactory behavior or stick to it
- If store operators want to make their processes efficient, they should develop a solution – each for themselves
Did I understand that correctly?
Hello @doublezed2 ,
Unfortunately, even with rollbacks up to version 9.4.0, I couldn’t find out when the problem started.
It may have existed for some time, and we only noticed it recently.Perhaps we can relabel the topic from “Error” to “Suggestion for improvement”.
Proposal
It would be good if there were a PHP filter that allows developers to choose between a server-side and a client-side preselection of a product variant for product pages of variable products with attribute_pa_* properties in the query parameters.
Use case
The use case clearly relates to online stores that send users directly to product pages that preselect properties via URL.
This is common for Google Shopping Ads, for example. Performance is important there, so we as store operators are very interested in delivering such specific variant page views via cache (e.g. via WP Rocket).
We therefore cache a product page without preselection and deliver this cached version, regardless of which query parameters are in the URL.
To ensure that the whole process runs smoothly, the product variant should then be selected on the client side via JavaScript after the cached product page has been delivered.Implementation
By default, it can remain as it is.
On the server side in wc_dropdown_variation_attribute_options(), select the variants that can be read in the URL.If the filter described above is used by a developer to perform the preselection on the client side, the following should happen:
1.) The function
wc_dropdown_variation_attribute_options()or its caller ensures that only the product variation defined as the preferred variant in the backend is marked as “selected” in the HTML on the server side and delivered. (Or no variation if no preferred variation has been defined by the store operator). The query parameters in the URL are therefore ignored during server-side HTML generation.
2.) On the client side, i.e. via JavaScript, the possibly existing query parameters in the URL of a product page should be synchronized with the selectable product properties. This means: If, for example,?attribute_pa_color=redis in the URL, then the WooCommerce JavaScript should automatically select the red product variant, if possible.Here is an example of JavaScript code that only refers to the color example.
If you were to implement it ready for production, you would probably first go through all the properties in the add to cart form in a loop, then check the query parameters associated with the individual select fields and set any values found accordingly via JavaScript.function initSingleProductPageVariationsForm() {
const searchParams = new URLSearchParams(window.location.search);
const COLOR_ATTR = "attribute_pa_color";
const queriedValue = searchParams.has(COLOR_ATTR) ? searchParams.get(COLOR_ATTR) : '';
const selectField = document.querySelector('form.variations_form.cart select[name="' + COLOR_ATTR + '"]');
if (!selectField) return;
let isQueriedValueAvailable = false;
const selectedIndex = selectField.selectedIndex;
for (let i = 0; i < selectField.length; i++) {
const option = selectField.options[i];
isQueriedValueAvailable = queriedValue === option.value;
if (isQueriedValueAvailable) break;
}
selectField.value = queriedValue && isQueriedValueAvailable ? queriedValue : "";
selectField.dispatchEvent(new Event("input", {
bubbles: true
}));
selectField.dispatchEvent(new Event("change", {
bubbles: true
}));
console.log({
isQueriedValueAvailable,
queriedValue,
selectField
})
}
jQuery(function() {
initSingleProductPageVariationsForm()
});We, and presumably many other online store operators, would be happy to see an improvement in WooCommerce in the future.
If the proposed improvement lands, then caching plugins, such as WP Rocket, can automatically and safely ignore URL parameters in the style of
attribute_pa_*on product pages, so that many stores should generally benefit from this improvement in terms of loading time and thus also conversion rate.Hello @doublezed2 ,
Unfortunately, I can’t say exactly which WooCommerce version started the problem.
With WooCommerce 9.5.1, if I remember correctly, everything still worked as usual.
Apparently the problem has been active since 9.5.2?
Maybe I am also wrong.Here is the link to pastebin: https://pastebin.com/x57bxKKB
As I said: the problem occurs when a cached product page that has an identifier for a variation in the URL is called from cache.
(We ignore thepa*-parts of the query in our cache config. This is a special config. Normally, product variants are not explicitly ignored via WooCommerce and WP Rocket, so product pages with pre-selected variants are usually delivered uncached).Caching takes place with WP Rocket.
But that shouldn’t be the problem.It would be good if the WooCommerce frontend scripts (again) actively searched for the query parameters in the URL and, if found, selected the corresponding product variant.
Hello @louisekrokedil ,
Thank you very much for keeping your word and publishing the long-awaited update at the beginning of the year.
Regarding the error rate for orders with Klarna: To be honest, I don’t think the problem is just ours either.
@janez33 also wrote, see above, that almost 20% of their Klarna orders don’t go through. So the problem with the inexplicable cancellations doesn’t just seem to affect us.
Klarna was by far our biggest problem with payment service providers in 2024 and we want to see an improvement now before we invest any more time.
We will therefore first check to what extent the new update runs smoothly and supports our automatic processes. Then we can still take care of the error rate.
Hello @mahfuzurwp ,
Thank you. I have created a feature request.
We may implement your adaptation as an interim solution.
Thanks for the help, ticket can be closed.@louisekrokedil Regarding the order note: I would like to agree with @janez33 here. I cannot confirm that customers cancel an order and that this is the reason for the order note.
We have the note on many failed orders. According to their own statements, customers have not canceled and even ask us why the order has not yet arrived. So they definitely don’t want to cancel on purpose. There may be a technical error along the way that none of us or the customers are currently aware of.None of us or our customers can explain it.
It is WooCommerce standard behavior to create a Pending Payment order in WooCommerce when the payment process starts.
At this point I would like to give some inspiration on how PayPal solves the issue in Woocommerce. Just a different perspective.
If the customer clicks on “Buy” in the checkout, the PayPal popup opens.
If canceled within the PayPal popup, the user returns to the checkout and the order does not exist in the WooCommerce backend.This “PayPal approach” has worked for us in our store for years without any problems.
We have had no problems with PayPal orders and everything runs smoothly.We are currently working on a new workflow to use the failed order status in WooCommerce and the release is planned for early next year. Thanks for giving us all details on this!
We would like to thank you for taking this issue seriously and optimizing it. This will help us and many other store operators to use Klarna. And that will certainly help Klarna too.
@janez33 Thank you for supporting our points and all the details about your case. We appreciate it.
Interesting to see that you also have a very high rate of orders not going through. It’s similar for us. This only affects Klarna. Other payment providers have significantly lower abandonment rates.
What we find also a big problem is this:
When order is created via Klarna and its status is in pending the order is not reflected yet in Klarna system so we don’t know what happens to the customer and why the payment didn’t go through.@louisekrokedil Just for the sake of completeness: We can confirm the problem described by @janez33.