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';
}

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註