-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Describe the bug
When an order is manually created in WooCommerce dashboard and the customer pays via Apple Pay using the payment link, the refund option via WooPayments is not available. The only available refund option is a manual refund. However, if a customer places an order directly through the shop and checks out using Apple Pay, the refund option via WooPayments works correctly.
This issue does not affect card payments but has not been tested for Google Pay transactions yet.
To Reproduce
- Manually create an order via WooCommerce Admin by going to Orders > Add Order.
- Fill in the customer email address in the Billing address section.
- Add items to the order.
- Press the Create button to create the order.
- Send a payment link to the customer.
- Pay via Apple Pay using the payment link.
- Go to WooCommerce > Orders, open the order, and attempt to issue a refund.
- Observe that the "Refund via WooPayments" button is missing, and only a manual refund option is available.
Actual behavior
- The WooPayments refund option is missing.
- In the database (wp_wc_orders table), the payment_method field for such transactions appears to be empty.
Screenshots
wp_wc_orders table for orders that have the Refund via WooPayments option:

Order page for normal order placed through the shop and paid via Apple Pay. Notice the Refund via WooPayments Button

wp_wc_orders table for orders that do not have the Refund via WooPayments option:

Order page for Manually added order and Apple Pay payment via payment link: Notice the missing Refund via WooPayments Button

Expected behavior
- When an order is manually created in WooCommerce dashboard and the customer pays via Apple Pay using the payment link, the refund option via WooPayments should be available.
- The payment_method field in the wp_wc_orders table should correctly store woocommerce_payments for these transactions.
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
Payment made via
- Device: [iPhone 15 Pro Max]
- OS: [iOS18.3]
- Browser [stock browser, safari]
Additional context
9309517-zen