Change WooCommerce Variation Dropdown Text

Woocommerce Dropdown Variation Text

You can change the default text in the product variation dropdown from ‘Choose an option‘…. to something else with the ‘woocommerce_dropdown_variation_attribute_options_args‘ filter. Add in your functions.php add_filter( ‘woocommerce_dropdown_variation_attribute_options_args’, ‘bt_dropdown_choice’ ); // /** * Change the custom dropdown “Choose an option” text on the front end */ function bt_dropdown_choice( $args ){ if( is_product() ) { $args[‘show_option_none’] =…

Read More

Remove WooCommerce SKU: N/A Category in Products

Remove Woocommerce Sku

You can remove the WooCommerce sku line – SKU: N/A Category from products in WordPress by using the ‘wc_product_sku_enabled‘ filter. Just add in your theme’s functions.php file… add_filter( ‘wc_product_sku_enabled’, ‘__return_false’ ); This will remove the sku everywhere. Remove the SKU Item Conditionally You may want to keep the SKU info published on some categories or products only – you…

Read More

Add WooCommerce MyAccount Page Login/Logout to Menu

This code adds a login/logout link to your WordPress primary menu to log the user into the WooCommerce My Account page and then also log out to the same or different page. It differs from the referred article as that adds the WordPress default login/logout page. The menus need to be registered via register_nav_menu and positioned with theme_location,…

Read More

Add Link to the Count in WooCommerce Product Category Menu

product-category-count-link-archive

The WooCommerce product category menu can be manipulated by making a copy of the walker class it is defined in and editing it. The WC_Product_Cat_List_walker class lives in wooc0mmerce/includes/walkers/class-product-cat-list-walker.php, you can make a copy of this and include it in your child theme and include it. Best to create a classes subfolder in your child…

Read More

Filter WooCommerce Order Received Thank You Text

You can filter the text on a WooCommerce order received after checkout, by default the text reads ‘Thank you. Your order has been received’, but you may want to add some further instruction, which you can do using the filter woocommerce_thankyou_order_received_text View the code on Gist. Above the original text is being replaced. Or below the…

Read More

Customize WooCommerce Product Search Field

woocommerce-search-field

The WooCommerce Product Search field can be added via a widget and also via a template tag… get_product_search_form() Another option is a filter get_product_search_form() by which you can create your own custom search field including using an icon. The Original Markup View the code on Gist. This will just reproduce the form in it’s original…

Read More

WooCommerce Skip Cart, Go Straight to Checkout Page

WooCommerce workflow can be a little too long for simple products, you can provide a better user experience, here’s how to get the product to skip past the cart page and go straight to the checkout page. First, uncheck the cart options in WooCommerce Settings -> Products. Then add in your functions.php add_filter(‘woocommerce_add_to_cart_redirect’, ‘themeprefix_add_to_cart_redirect’); function…

Read More