Changing the WooCommerce coupon text in cart and checkout pages

Woocommerce Change Coupon Code Text

…add_filter( ‘woocommerce_cart_totals_coupon_label’, ‘bt_rename_coupon_label’,10, 1 ); add_filter( ‘woocommerce_checkout_coupon_message’, ‘bt_rename_coupon_message_on_checkout’ ); /** * WooCommerce * Change Coupon Text * @param string $text * @return string * @link https://gist.github.com/maxrice/8551024 */ function bt_rename_coupon_field_on_cart( $translated_text,…

Read More

Set WooCommerce cart product count total to be divisible by number

Number Of Products Woocommerce

…checkout. add_action( ‘woocommerce_check_cart_items’, ‘check_cart_items_conditionally’ ); /** * Check cart items conditionally displaying an error notice and avoiding checkout * @link https://stackoverflow.com/questions/65767078/disable-woocommerce-checkout-if-cart-items-count-is-not-a-multiple-of-n */ function check_cart_items_conditionally() { $multiple_of = 6; // <=…

Read More

Sort WooCommerce products from product category to be last in cart order

Woocommerce Cart Product Category Last

…to be last order in cart * @link https://stackoverflow.com/questions/65800801/sort-specific-product-category-cart-items-at-the-end-in-woocommerce */ function product_category_cart_items_sorted_end() { $category_terms = __(‘box’); // Here set your category terms (can be names, slugs or Ids) $items_in_category =…

Read More