Skip to content
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

added ApplePay and GooglePay to refund payment methods #2752

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

danielhuesken
Copy link
Contributor

This fixes that the "Void authorization" Butten in Orders will not be shown.

@@ -119,7 +109,8 @@ public function __construct(
*/
public function process( WC_Order $wc_order, float $amount = null, string $reason = '' ) : bool {
try {
if ( ! in_array( $wc_order->get_payment_method(), $this->allowed_refund_payment_methods, true ) ) {
$payment_gateways = WC()->payment_gateways()->payment_gateways();
if ( ! isset( $payment_gateways[ $wc_order->get_payment_method() ] ) || ! $payment_gateways[ $wc_order->get_payment_method() ]->supports( 'refunds' ) ) {
Copy link
Contributor

@AlexP11223 AlexP11223 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems unnecessary, I think WC is not supposed to call this method when refunds are not supported? Or at least it would not show the refund button.

But I guess additional check will not hurt.

@Dinamiko Dinamiko merged commit d00e6fb into trunk Nov 18, 2024
6 checks passed
@Dinamiko Dinamiko deleted the PCP-3828_fix-missind-void-auth-button branch November 18, 2024 12:55
@InpsydeNiklas InpsydeNiklas added this to the 2.9.5 milestone Nov 28, 2024
@Dinamiko Dinamiko mentioned this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants