On my WooCommerce store, I have the WooCommerce PayPal Payments plugin installed.
Here is an image of my current payment structure:
Now, when I click on the "Pay with PayPal" button, the PayPal modal pops up which prompts me to log into PayPal. If I wait a few seconds, and input nothing in the modal, an email comes through saying "thank you for your order".
In short, the WooCommerce new order email gets triggered, even though the payment details haven't been entered. If I then close the modal and refresh the checkout page, I'm still asked for payment (normally on successful payment and order, you'll get redirected to a thank you / summary page).
Then, when logging in as an admin, I can see the new order come through which states the order is paid already.
Since I've enabled the PayPal Payments plugin, the yellow button has replaced the default "place order" button that WooCommerce provides. Initially, I was thinking on click of the yellow button, maybe the default button is being clicked too (because it's still in the markup).
The default button has the markup of:
<button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="Place order" data-value="Place order">Place order</button>
And I have hidden this via CSS using:
#place_order {
height: 0;
opacity: 0;
visibility: hidden;
display: none;
pointer-events: none;
}
With pointer-events: none; I am trying to prevent this button from clicking, if that is what's causing this.
However, the emails still get triggered when payment isn't complete?
Any idea's on what may be happening here? There are also nothing in WooCommerce logs that I can check, no logs get generated.
Edit:
I have been reading the following thread and noticed the poster said they "disabled IPN in woocommerce settings". I was thinking maybe disabling this in my settings will prevent it from sending the order emails (and then when the IPN is sent and received by PayPal, the email will get triggered). But, I cannot see in settings where I can turn IPN off? I'm on WooCommerce Version 5.8.0.
