Fix deprecation notice in coming soon and store-only mode (#51474)
* Wrap parse_str under a check * Changelog
This commit is contained in:
parent
d6f1cce424
commit
6a83e8d301
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Wrap parse_str under a check to resolve deprecation notice
|
|
@ -154,13 +154,15 @@ class WCAdminHelper {
|
|||
'post_type' => 'product',
|
||||
);
|
||||
|
||||
parse_str( wp_parse_url( $url, PHP_URL_QUERY ), $url_params );
|
||||
|
||||
$query_string = wp_parse_url( $url, PHP_URL_QUERY );
|
||||
if ( $query_string ) {
|
||||
parse_str( $query_string, $url_params );
|
||||
foreach ( $params as $key => $param ) {
|
||||
if ( isset( $url_params[ $key ] ) && $url_params[ $key ] === $param ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WC store pages.
|
||||
$store_pages = array(
|
||||
|
|
Loading…
Reference in New Issue