Display admin message if php is lower than 7.1

This commit is contained in:
dinamiko 2021-04-20 15:36:44 +02:00
parent 0668a9c924
commit 7baa0a17ce

View file

@ -59,6 +59,16 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
return;
}
if ( version_compare( PHP_VERSION, '7.1', '<' ) ) {
add_action(
'admin_notices',
function() {
echo '<div class="error"><p>' . esc_html__( 'WooCommerce PayPal Payments requires PHP 7.1 or above.', 'woocommerce-paypal-payments' ), '</p></div>';
}
);
return;
}
static $initialized;
if ( ! $initialized ) {