This commit is contained in:
Pedro Silva 2024-01-17 12:01:40 +00:00
parent d20912a336
commit 15d398af8f
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -177,6 +177,16 @@ class WcSubscriptionsModule implements ModuleInterface {
add_filter(
'woocommerce_subscription_payment_method_to_display',
/**
* Corrects the payment method name for subscriptions.
*
* @param string $payment_method_to_display The payment method string.
* @param \WC_Subscription $subscription The subscription instance.
* @param string $context The context, ex: view.
* @return string
*
* @psalm-suppress MissingClosureParamType
*/
function ( $payment_method_to_display, $subscription, $context ) {
$payment_gateway = wc_get_payment_gateway_by_order( $subscription );