mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
♻️ More appropriate hook name
This commit is contained in:
parent
5ac70e26c2
commit
5f51762025
5 changed files with 4 additions and 5 deletions
|
@ -183,7 +183,7 @@ class ApplepayModule implements ServiceModule, ExtendingModule, ExecutableModule
|
|||
);
|
||||
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_rest_common_merchant_data',
|
||||
'woocommerce_paypal_payments_rest_common_merchant_features',
|
||||
function( array $features ) use ( $c ): array {
|
||||
$product_status = $c->get( 'applepay.apple-product-status' );
|
||||
assert( $product_status instanceof AppleProductStatus );
|
||||
|
|
|
@ -233,7 +233,7 @@ class GooglepayModule implements ServiceModule, ExtendingModule, ExecutableModul
|
|||
);
|
||||
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_rest_common_merchant_data',
|
||||
'woocommerce_paypal_payments_rest_common_merchant_features',
|
||||
function ( array $features ) use ( $c ): array {
|
||||
$product_status = $c->get( 'googlepay.helpers.apm-product-status' );
|
||||
assert( $product_status instanceof ApmProductStatus );
|
||||
|
|
|
@ -60,7 +60,6 @@ class ApmProductStatus extends ProductStatus {
|
|||
return $status_override;
|
||||
}
|
||||
|
||||
// Check if status was checked on previous requests.
|
||||
if ( $this->settings->has( self::SETTINGS_KEY ) && ( $this->settings->get( self::SETTINGS_KEY ) ) ) {
|
||||
return wc_string_to_bool( $this->settings->get( self::SETTINGS_KEY ) );
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ class CommonRestEndpoint extends RestEndpoint {
|
|||
|
||||
if ( $this->settings->is_merchant_connected() ) {
|
||||
$extra_data['features'] = apply_filters(
|
||||
'woocommerce_paypal_payments_rest_common_merchant_data',
|
||||
'woocommerce_paypal_payments_rest_common_merchant_features',
|
||||
array(),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -550,7 +550,7 @@ class WCGatewayModule implements ServiceModule, ExtendingModule, ExecutableModul
|
|||
);
|
||||
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_rest_common_merchant_data',
|
||||
'woocommerce_paypal_payments_rest_common_merchant_features',
|
||||
static function ( array $features ) use ( $c ) : array {
|
||||
try {
|
||||
$billing_agreements_endpoint = $c->get( 'api.endpoint.billing-agreements' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue