From ba25941808d52e1732fb842d4ad85132ae4d7d4e Mon Sep 17 00:00:00 2001 From: Kader Ibrahim S Date: Thu, 9 May 2024 18:19:53 +0530 Subject: [PATCH] Adds support for PHP < 8.0 (#126) --- packages/php/compat-checker/src/Checks/CompatCheck.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/php/compat-checker/src/Checks/CompatCheck.php b/packages/php/compat-checker/src/Checks/CompatCheck.php index 601f3482..5fde2571 100644 --- a/packages/php/compat-checker/src/Checks/CompatCheck.php +++ b/packages/php/compat-checker/src/Checks/CompatCheck.php @@ -181,7 +181,7 @@ public function remove_dismissable_notices() { $plugin_basename = plugin_basename( $this->plugin_data['File'] ); $all_notices = WC_Admin_Notices::get_notices(); foreach ( $all_notices as $notice_name ) { - if ( true === str_starts_with( $notice_name, $plugin_basename ) ) { + if ( 0 === strpos( $notice_name, $plugin_basename ) ) { WC_Admin_Notices::remove_notice( $notice_name ); } }