mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Fix psalm
This commit is contained in:
parent
09c7537e48
commit
157dd41b7c
3 changed files with 20 additions and 2 deletions
|
@ -160,7 +160,15 @@ class SubscriptionModule implements ModuleInterface {
|
|||
|
||||
add_action(
|
||||
'admin_enqueue_scripts',
|
||||
/**
|
||||
* Param types removed to avoid third-party issues.
|
||||
*
|
||||
* @psalm-suppress MissingClosureParamType
|
||||
*/
|
||||
function( $hook ) use ( $c ) {
|
||||
if ( ! is_string( $hook ) ) {
|
||||
return;
|
||||
}
|
||||
$settings = $c->get( 'wcgateway.settings' );
|
||||
$subscription_mode = $settings->has( 'subscriptions_mode' ) ? $settings->get( 'subscriptions_mode' ) : '';
|
||||
if ( $hook !== 'post.php' || $subscription_mode !== 'subscriptions_api' ) {
|
||||
|
@ -183,7 +191,7 @@ class SubscriptionModule implements ModuleInterface {
|
|||
true
|
||||
);
|
||||
|
||||
$plan = $product->get_meta( 'ppcp_subscription_plan' ) ?? null;
|
||||
$plan = $product->get_meta( 'ppcp_subscription_plan' ) ?? array();
|
||||
$plan_id = $plan['id'] ?? '';
|
||||
wp_localize_script(
|
||||
'ppcp-paypal-subscription',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue