omise / omise-woocommerce

Omise WooCommerce Plugin
https://docs.opn.ooo/woocommerce-plugin
MIT License
47 stars 27 forks source link

[APM2-59] fix underline issue related to disable merchant new order email for on-hold #232

Closed nimitomise closed 3 years ago

nimitomise commented 3 years ago
  1. Objective

Related information: Related PR(s): #232

  1. Description of change

Override Woocommerce filter for woocommerce_email_recipient_new_order which able to initiate with status as on-hold to not send order email to merchant. Override woocommerce_order_status_processing to send notification email depend on payment method

  1. Quality assurance

🔧 Environments:

Tested locally by pointing OMISE_API_URL to staging-omise

WooCommerce: v5.7.1 WordPress: v5.8 PHP version: 7.1

✏️ Details:

Make sure setting merchant email at /wp-admin/admin.php?page=wc-settings&tab=email&section=wc_email_new_order or /wp-admin/admin.php?page=wc-settings&tab=email to your valid email Checkout cart with Paynow payment make sure customer email is valid and accessible Go to customer mail box should still receive new order email Go to merchant mail box should not receive new order email Checkout cart with Credit Card and accessible Go to customer mail box should still receive new order email Go to merchant mail box should still receive new order email

  1. Impact of the change No

  2. Priority of change Normal

  3. Additional Notes No

kan98 commented 3 years ago

just checking if you've tested other payment methods to see they still work as expected 🙂

nimitomise commented 3 years ago

@kan98 Yes. I have checked checkout with internet banking then an email with processing status to customer and an email to merchant.

nimitomise commented 3 years ago

Try to add unit test for Helper function but too complicated !!

kan98 commented 3 years ago

Try to add unit test for Helper function but too complicated !!

No problem! Thanks for refactoring the function out 🙂 . PR looks good to me 👍🏽