-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(woocommerce-emails): use the default email if there are no donation products #3545
Conversation
@@ -266,6 +266,19 @@ public static function force_disable_order_attribution( $should_allow ) { | |||
* @return bool | |||
*/ | |||
public static function send_customizable_receipt_email( $enable, $order, $class ) { | |||
// If there are no donation products in the order, do not override the default WC receipt email. | |||
$has_donation_product = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other places we check this using
$product_id = \Newspack\Donations::get_order_donation_product_id( $order_id );
which is basically the same thing you do here. Isn't it simples if we just use that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, thanks! Changed in b3e62f0
Hey @adekbadek, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
# [5.9.0-alpha.1](v5.8.1...v5.9.0-alpha.1) (2024-11-29) ### Bug Fixes * **ras-acc:** make helper text size more specific ([#3584](#3584)) ([5bcc688](5bcc688)) * undefined var ([#3585](#3585)) ([00d8bc7](00d8bc7)) * **woocommerce-emails:** use the default email payload if there are no donation products ([#3545](#3545)) ([60c21f3](60c21f3)) ### Features * mark perfmatters as a required plugin ([#3578](#3578)) ([f20291c](f20291c)) * **ras-acc:** add reader account creation and login improvements ([#3582](#3582)) ([b66de08](b66de08)) * **reader-data:** add a CLI command to align reader membership data ([#3548](#3548)) ([8e49bf0](8e49bf0)) * **subscriptions:** add setting to reattempt payment after final retry ([#3560](#3560)) ([553c3ac](553c3ac)) * **woocommerce:** remove internal metadata from REST API response ([6b659a6](6b659a6))
🎉 This PR is included in version 5.9.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [5.9.0](v5.8.2...v5.9.0) (2024-12-09) ### Bug Fixes * **emails:** account for false order value ([#3590](#3590)) ([a2e4042](a2e4042)) * **ras-acc:** correct My Account custom font sizing clash ([#3588](#3588)) ([080f1ce](080f1ce)) * **ras-acc:** make helper text size more specific ([#3584](#3584)) ([5bcc688](5bcc688)) * **ras-acc:** re-add recaptcha to the WooCommerce checkout ([#3605](#3605)) ([07f46b3](07f46b3)) * undefined var ([#3585](#3585)) ([00d8bc7](00d8bc7)) * **woocommerce-emails:** use the default email payload if there are no donation products ([#3545](#3545)) ([60c21f3](60c21f3)) ### Features * mark perfmatters as a required plugin ([#3578](#3578)) ([f20291c](f20291c)) * **ras-acc:** add reader account creation and login improvements ([#3582](#3582)) ([b66de08](b66de08)) * **reader-data:** add a CLI command to align reader membership data ([#3548](#3548)) ([8e49bf0](8e49bf0)) * **subscriptions:** add setting to reattempt payment after final retry ([#3560](#3560)) ([553c3ac](553c3ac)) * **woocommerce:** remove internal metadata from REST API response ([6b659a6](6b659a6))
🎉 This PR is included in version 5.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Fixes the custom receipt emails, so that they are not sent for order which do not contain donation products.
How to test the changes in this Pull Request:
Other information: