omise / omise-woocommerce

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

Update class-omise-payment-konbini.php #360

Open bluantinoo opened 1 year ago

bluantinoo commented 1 year ago

Add payment link to konbini emails only if order is not paid yet

1. Objective

Konbini Payment link is added in every email notification, this is confusing, both for admins that do not know what they are clicking and for customers that receive notification after successful payment.

This section will be used in the release notes.

2. Description of change

check if the order is still unpaid before adding the Konbini payment link in the email with the woocommerce_email_after_order_table action

aashishgurung commented 1 year ago

@bluantinoo Thank you for submitting your pull request. We have received it and We will review it as soon as possible. We appreciate your contribution to our project.

bluantinoo commented 1 year ago

@aashishgurung thank you for the quick reaction! I made a very small edit, it's more of a suggestion... I think there should be some sort of control on where to add the payment link in emails.

I would love 2 options for the single email setting: a) add a payment link to this email (yes or no); b) where would you like to add the link? (choosing the position between available WC email template's hooks);

But generally, I think the payment link on emails sent after a successful transaction makes no sense.

Furthermore, the link sent in admin emails is broken.