WC_Admin_Notices::maybe_add_php73_required_notice()
Add an admin notice about the bump of the required PHP version in WooCommerce 7.7 if the current PHP version is too old.
TODO: Remove this method in WooCommerce 7.7.
Method of the class: WC_Admin_Notices{}
No Hooks.
Return
null
. Nothing.
Usage
$result = WC_Admin_Notices::maybe_add_php73_required_notice();
WC_Admin_Notices::maybe_add_php73_required_notice() WC Admin Notices::maybe add php73 required notice code WC 7.5.1
private static function maybe_add_php73_required_notice() { if ( version_compare( phpversion(), '7.3', '>=' ) ) { return; } self::add_custom_notice( 'php73_required_in_woo_77', sprintf( '%s%s', sprintf( '<h4>%s</h4>', esc_html__( 'PHP version requirements will change soon', 'woocommerce' ) ), sprintf( // translators: Placeholder is a URL. wpautop( wp_kses_data( __( 'WooCommerce 7.7, scheduled for <b>May 2023</b>, will require PHP 7.3 or newer to work. Your server is currently running an older version of PHP, so this change will impact your store. Upgrading to at least PHP 8.0 is recommended. <b><a href="%s">Learn more about this change.</a></b>', 'woocommerce' ) ) ), 'https://developer.woocommerce.com/2023/01/10/new-requirement-for-woocommerce-7-7-php-7-3/' ) ) ); }