Merge pull request #2405 from woocommerce/PCP-3191-introduce-notice-for-paypal-payments-3-0-update-warning

Add notice when upgrading to plugin version >= 3.0.0 (3191)
This commit is contained in:
Emili Castells 2024-07-23 14:29:25 +02:00 committed by GitHub
commit 90eeecc75c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -223,6 +223,22 @@ define( 'PPCP_PAYPAL_BN_CODE', 'Woo_PPCP' );
} }
); );
add_action(
'in_plugin_update_message-woocommerce-paypal-payments/woocommerce-paypal-payments.php',
static function( array $plugin_data, \stdClass $new_data ) {
if ( version_compare( $plugin_data['Version'], '3.0.0', '<' ) &&
version_compare( $new_data->new_version, '3.0.0', '>=' ) ) {
printf(
'<br /><strong>%s</strong>: %s',
esc_html__( 'Warning', 'woocommerce-paypal-payments' ),
esc_html__( 'WooCommerce PayPal Payments version 3.0.0 contains significant changes that may impact your website. We strongly recommend reviewing the changes and testing the update on a staging site before updating it on your production environment.', 'woocommerce-paypal-payments' )
);
}
},
10,
2
);
/** /**
* Check if WooCommerce is active. * Check if WooCommerce is active.
* *