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

Change the WooCommerce Shop Page URL

woocommerce-shop-page

You can change the WooCommerce shop URL with a filter that WooCommerce provides, this can be helpful especially if you have a one product based shop and you want your users to return to that product and not the default shop page URL. The filter to use is aptly named – woocommerce_return_to_shop_redirect add_filter( ‘woocommerce_return_to_shop_redirect’, ‘st_woocommerce_shop_url’ );…

Read More