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

Change WooCommerce Price to be by Weight

woocommerce-by-weight

You can change the WooCommerce price to be by weight by appending some text after the actual price such as ‘per kg’, this can be done by manipulating 3 filters that display the price in the shop/product page, cart and checkout pages; woocommerce_get_price_html woocommerce_cart_item_price woocommerce_checkout_cart_item_quantity If all items were to be classified as ‘per kg‘…

Read More

Skip Cart Go Straight to Checkout Page in WooCommerce

WooCommerce workflow can be a little too long for simple products, 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(‘add_to_cart_redirect’, ‘themeprefix_add_to_cart_redirect’); function themeprefix_add_to_cart_redirect() { global $woocommerce; $checkout_url = $woocommerce->cart->get_checkout_url();…

Read More