Please debug as following if you haven’t done yet:
- Deactivate all plugins one by one checking each time.
- Switch to Storefront theme and test
- Disable any custom scripts you might have
.
@sebastopolys already did. The problem is that when you click buy now button it adds to the checkout URL something like – ?add-to-cart=34574&quantity=1
Once on the checkout page if you log in it brings you right back to the same url which has ?add-to-cart=34574&quantity=1 at the end so it repeats the add to cart.
How can I fix it so that after login on the checkout page it redirects to /checkout without the added task?
Might be a server issue.
If possible, test on a fresh WP installation on the same server.
In addition, you can try editing the login functionality, so users can login on a different page before acceding to the checkout.
@sebastopolys I have tried with several sites and spoken to a few developers. Everyone is saiyng the same thing. It is because the query string is there. No matter what you do the query string does what it does so if the customer logs in then when page refreshes the query string will work for a second time.
@sebastopolys there has to be some php we can add in that strips the query string after the checkout page loads for the first time.
Please try reflush permalinks:
Whenever a new Custom Post is added through a plugin or code; usually WordPress permalinks needs to be flushed.
- Step 1: In the WordPress admin area, go to “Settings > Permalinks”
- Step 2: Click “Save Changes”
- Step 3: Permalinks and rewrite rules are flushed.
@sebastopolys I did what you said to flush the permalinks, no difference.
I need help please @sebastopolys . This is confirmed 100% a bug within the plugin and not from conflicting with another plugin or theme.
We even wrote a code snippet to take away the query string after the page loads but Direct Checkout has this hardcoded in somehow that it doesn’t matter. With the below snippet it you hit buy now button and go to checkout you can see the query string with add to cart disappear but still when you login it readds the product to the cart
add_action( 'wfacp_internal_css', function () {
?>
<script>
window.addEventListener('bwf_checkout_load', function () {
window.history.pushState(null, null, window.location.origin + window.location.pathname);
jQuery('.woocommerce-form-login [name="_wp_http_referer"]').val('')
});
</script>
<?php
} );
@sebastopolys. ???????
This is very frustrating. I paid for the premium version and tp this day support never answered me back and you only answer once every other week it seems.
This is 100% an issue with the Direct Checkout plugin. Please help me resolve this
@sebastopolys am I just being ignored at this point? Please help fix the issue with the plugin (which has already been confirmed it is not a conflict with other plugins or a theme) or how do I get a refund? Please keep in mind I don’t want a refund, but if I am just going to be ignored that is only other option.
Sorry, as support agent there’s not much I can do for the moment.
The dev team is already aware of this issue and will be fixed if possible.
However, we think it’s a minor issue since it can be undone by the user on frontend easily.
-
This reply was modified 1 year, 8 months ago by
sebastopolys.
@sebastopolys thank you for your response
It’s far from a minor issue though (I understandwhy you would think it would be though). I’ve had customers accuse us of trying to “slip” in extra products to charge them for.
Yes, I understand that.
I’m sure it will be fixed on next updates. Please be patient.
@sebastopolys its been a few months now and I had to get a different plugin to have a buy now button working properly. Can I please have a refund?