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,11 +154,13 @@ class WCAdminHelper {
|
||||||
'post_type' => 'product',
|
'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 ) {
|
||||||
foreach ( $params as $key => $param ) {
|
parse_str( $query_string, $url_params );
|
||||||
if ( isset( $url_params[ $key ] ) && $url_params[ $key ] === $param ) {
|
foreach ( $params as $key => $param ) {
|
||||||
return true;
|
if ( isset( $url_params[ $key ] ) && $url_params[ $key ] === $param ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue