Support » Plugin: WooCommerce iDEAL Gateway » Bug: Payment confirmation emails not sent (processing)

  • Resolved MilaWitjes


    When customers complete their iDeal payment, no “payment is complete” (processing) email is sent (in my installation). They only receive the “Payment is pending” (on-hold) email.

    After inspecting the iDeal plugin, it appears that the transactional email should be sent after calling $order->payment_complete($source_id) in woo-ideal-gateway-class-stripe-webhook.php. It is not working because woocommerce has not yet initialized the transactional emails.

    woo-ideal-gateway-class-stripe-webhook.php is included and run in the function IncludeClasses(). This function is called using add_action(‘init’, ‘IncludeClasses’); (in file woo-ideal-gateway.php).

    Woocommerce configures the transactional emails with add_action( ‘init’, array( ‘WC_Emails’, ‘init_transactional_emails’ ) ); The relevant hook is “woocommerce_order_status_on-hold_to_processing” in this case. Because add_action calls use the same priority (10: default), it can happen that the Stripe webhook is executed before Woocommerce is ready.

    Suggested fix in woo-ideal-gateway.php:
    [89] add_action(‘init’, ‘IncludeClasses’);
    [89] add_action(‘init’, ‘IncludeClasses’, 11);

    This change fixed the issue for me.

    Thanks in advance.

    • This topic was modified 1 year, 2 months ago by MilaWitjes.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug: Payment confirmation emails not sent (processing)’ is closed to new replies.