generate_woocommerce_menu_item_location

generate_woocommerce_menu_item_location

The generate_woocommerce_menu_item_location allows you to change where the WooCommerce cart icon is displayed. If you want the cart icon from primary menu to secondary menu, try this PHP snippet below:

add_filter( 'generate_woocommerce_menu_item_location', 'tu_move_menu_cart_item' );
function tu_move_menu_cart_item() {
return 'secondary';
}

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注