woocommerce_cart_shortcode_tag хук-фильтрWC 2.1.0

Устарел с версии 8.3.0 This filter is deprecated and will be removed in future versions.. Больше не поддерживается и может быть удален. Рекомендуется заменить этот хук на аналог.

Determines the cart shortcode tag used for the cart page.

Использование

add_filter( 'woocommerce_cart_shortcode_tag', 'wp_kama_woocommerce_cart_shortcode_tag_filter', 10, 2 );

/**
 * Function for `woocommerce_cart_shortcode_tag` filter-hook.
 * 
 * @param  $array  
 * @param  $string 
 *
 * @return 
 */
function wp_kama_woocommerce_cart_shortcode_tag_filter( $array, $string ){

	// filter...
	return $array;
}
$array
-
$string
-

Список изменений

С версии 2.1.0 Введена.
Устарела с 8.3.0 This filter is deprecated and will be removed in future versions.

Где вызывается хук

WC_Install::create_pages()
woocommerce_cart_shortcode_tag
WC_REST_System_Status_V2_Controller::get_pages()
woocommerce_cart_shortcode_tag
woocommerce/includes/class-wc-install.php 806
$cart_shortcode = apply_filters_deprecated( 'woocommerce_cart_shortcode_tag', array( '' ), '8.3.0', 'woocommerce_create_pages' );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-v2-controller.php 1386
'shortcode' => '[' . apply_filters_deprecated( 'woocommerce_cart_shortcode_tag', array( 'woocommerce_cart' ), '8.3.0', 'woocommerce_create_pages' ) . ']',

Где используется хук в WooCommerce

Использование не найдено.