Remove Dashboard button from menu in my account page – WooCommerce

This requires 2 different hooked functions: The first function will remove the first my account menu item (which is the dashboard). The second function will redirect the default my account dashboard page to the first my account endpoint. The code: // Remove the first menu item (the dashboard) add_filter( ‘woocommerce_account_menu_items’, ‘account_menu_items_callback’ ); function account_menu_items_callback( $items … Read more

WooCommerce – Reset quantity input field when variation changes

To reset quantity input field to 1 when variation changes on product detail page use below code. you can set default quantity from jQuery(“[name=”quantity”]”).val(1);. i have tested and it is working fine for me. add_action( ‘wp_footer’, ‘variation_change_update_qty’ ); function variation_change_update_qty() { if (is_product()) { ?> <script> jQuery(function($){ $( “.variations_form” ).on( “woocommerce_variation_select_change”, function () { jQuery(“[name=”quantity”]”).val(1); … Read more

combine Code 1 with Code 2

Modified PHP code <?php // First, define these. $max_cat_count = 32; // this is ‘x’ $qty_per_column = 8; // this is ‘y’ // Then the $args array. $args = array( ‘taxonomy’ => ‘product_cat’, ‘number’ => $max_cat_count + 1, // keep the + 1 ‘hide_empty’ => 0, // … your other args here … ); // … Read more