Add filter to add more contexts in can render dcc checker

This commit is contained in:
Emili Castells Guasch 2024-06-14 17:34:57 +02:00
parent d8bba13716
commit f9bcc41c29

View file

@ -707,7 +707,11 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
return $this->settings->has( 'dcc_enabled' ) && $this->settings->get( 'dcc_enabled' )
&& $this->settings->has( 'client_id' ) && $this->settings->get( 'client_id' )
&& $this->dcc_applies->for_country_currency()
&& in_array( $this->context(), array( 'checkout', 'pay-now', 'add-payment-method' ), true );
&& in_array(
$this->context(),
apply_filters( 'woocommerce_paypal_payments_can_render_dcc_contexts', array( 'checkout', 'pay-now', 'add-payment-method' ) ),
true
);
}
/**