wc_shipping_enabled(); $coupons_enabled = wc_coupons_enabled(); // All three enabled. if ( $taxes_enabled && $shipping_enabled && $coupons_enabled ) { return __( 'Shipping, taxes, and discounts calculated at checkout.', 'woocommerce' ); } // Shipping + taxes. if ( $shipping_enabled && $taxes_enabled ) { return __( 'Shipping and taxes calculated at checkout.', 'woocommerce' ); } // Shipping + discounts. if ( $shipping_enabled && $coupons_enabled ) { return __( 'Shipping and discounts calculated at checkout.', 'woocommerce' ); } // Taxes + discounts. if ( $taxes_enabled && $coupons_enabled ) { return __( 'Taxes and discounts calculated at checkout.', 'woocommerce' ); } // Only shipping. if ( $shipping_enabled ) { return __( 'Shipping calculated at checkout.', 'woocommerce' ); } // Only taxes. if ( $taxes_enabled ) { return __( 'Taxes calculated at checkout.', 'woocommerce' ); } // Only discounts. if ( $coupons_enabled ) { return __( 'Discounts calculated at checkout.', 'woocommerce' ); } // None enabled. return ''; } }