mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Add notice when upgrading to plugin version >= 3.0.0
This commit is contained in:
parent
36a13f6500
commit
5123a1511c
1 changed files with 16 additions and 0 deletions
|
@ -222,6 +222,22 @@ define( 'PAYPAL_INTEGRATION_DATE', '2024-06-25' );
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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(
|
||||||
|
'<div class="update-message"><p><strong>%s</strong>: %s</p></div>',
|
||||||
|
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.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue