WooCommerce has provided a "reason" field for merchant to add a comment on the refund transaction. However, it hasn't been integrated to Omise Refund object.
Since Omise Refund API accepts for metadata parameter, it would be best to integrate it now.
Related information:
Internal ticket (T20652)
2. Description of change
There is nothing change in the term of UI. However, merchant now, can check for their refund's reason at Omise Dashboard as well.
3. Quality assurance
🔧 Environments:
WooCommerce: v4.0.1 (latest, at the time)
WordPress: v5.4 (latest, at the time)
PHP version: 7.3.3
✏️ Details:
Making sure that merchant can create a refund with a reason-adding.
At the WooCommerce Order Detail page (admin), click at the refund button.
There will be 2 fields show up, Refund Amount, and Reason for refund (optional).
Entering any message to the Reason for refund (optional) field.
If successful, a refund transaction will be displayed on WooCommerce Order page, as well as in Omise Dashboard, refund page.
We would also make sure that, without adding any message to the Reason for refund (optional) field, there should not be any problem.
At Omise metadata.reason, it will show as empty string.
Also making sure that the HTML (and script) tags will be sanitized before submitting to the Omise Refund API.
4. Impact of the change
No
5. Priority of change
Normal
6. Additional Notes
I think it would be nice if the coming metadata name is broadly used in another of Omise plugins as well, so please feel free to discuss about the naming there. (This PR is introducing $refund['metadata']['reason']).
1. Objective
WooCommerce has provided a "reason" field for merchant to add a comment on the refund transaction. However, it hasn't been integrated to Omise Refund object.
Since Omise Refund API accepts for metadata parameter, it would be best to integrate it now.
Related information: Internal ticket (T20652)
2. Description of change
There is nothing change in the term of UI. However, merchant now, can check for their refund's reason at Omise Dashboard as well.
3. Quality assurance
🔧 Environments:
✏️ Details:
Making sure that merchant can create a refund with a reason-adding.
At the WooCommerce Order Detail page (admin), click at the refund button.
There will be 2 fields show up, Refund Amount, and Reason for refund (optional). Entering any message to the Reason for refund (optional) field.
If successful, a refund transaction will be displayed on WooCommerce Order page, as well as in Omise Dashboard, refund page.
We would also make sure that, without adding any message to the Reason for refund (optional) field, there should not be any problem.
At Omise
metadata.reason
, it will show as empty string.Also making sure that the HTML (and script) tags will be sanitized before submitting to the Omise Refund API.
4. Impact of the change
No
5. Priority of change
Normal
6. Additional Notes
I think it would be nice if the coming metadata name is broadly used in another of Omise plugins as well, so please feel free to discuss about the naming there. (This PR is introducing
$refund['metadata']['reason']
).