[Enhancement] Create new filter `woocommerce_is_store_page` for filtering if the URL is a store page. (#50174)
Create a new filter woocommerce_is_store_page for filtering if the URL is a store page. Fixes #50173 * Create new filter for filtering if the URL is a store page * Fix brace * Update plugins/woocommerce/src/Admin/WCAdminHelper.php Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com> * Add changefile(s) from automation for the following project(s): woocommerce * Remove extra whitespace --------- Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
d92161cbd1
commit
0ca152fa0d
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: enhancement
|
||||
|
||||
Add filter `woocommerce_is_store_page` to modify whether Coming Soon mode considers a URL a store page or not.
|
|
@ -230,7 +230,16 @@ class WCAdminHelper {
|
|||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
/**
|
||||
* Filter if a URL is a store page.
|
||||
*
|
||||
* @since 9.3.0
|
||||
* @param bool $is_store_page Whether or not the URL is a store page.
|
||||
* @param string $url URL to check.
|
||||
*/
|
||||
$is_store_page = apply_filters( 'woocommerce_is_store_page', false, $url );
|
||||
|
||||
return filter_var( $is_store_page, FILTER_VALIDATE_BOOL );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue