__experimental_woocommerce_rest_get_recommended_themes
Filter the onboarding recommended themes response.
Использование
add_filter( '__experimental_woocommerce_rest_get_recommended_themes', 'wp_kama__experimental_woocommerce_rest_get_recommended_themes_filter', 10, 3 ); /** * Function for `__experimental_woocommerce_rest_get_recommended_themes` filter-hook. * * @param array $response The recommended themes response. * @param array $filtered_themes The filtered themes. * @param string $industry The industry to filter by (if provided). * * @return array */ function wp_kama__experimental_woocommerce_rest_get_recommended_themes_filter( $response, $filtered_themes, $industry ){ // filter... return $response; }
- $response(массив)
- The recommended themes response.
- $filtered_themes(массив)
- The filtered themes.
- $industry(строка)
- The industry to filter by (if provided).
Список изменений
С версии 8.3.0 | Введена. |
Где вызывается хук
__experimental_woocommerce_rest_get_recommended_themes
woocommerce/src/Admin/API/OnboardingThemes.php 235-247
return apply_filters( '__experimental_woocommerce_rest_get_recommended_themes', array( 'themes' => array(), '_links' => array( 'browse_all' => array( 'href' => home_url( '/wp-admin/themes.php' ), ), ), ), $industry, $currency );
woocommerce/src/Admin/API/OnboardingThemes.php 508-513
$filtered_response = apply_filters( '__experimental_woocommerce_rest_get_recommended_themes', $response, $industry, $currency );