Back to list of all filter and action hooks for Fluid Checkout PRO.
Description #
Fires before the order totals line on the checkout order summary table.
Example #
/**
* Add savings total line to order summary.
*/
function add_savings_total_to_order_summary() {
$discount_total = WC()->cart->get_cart_discount_total();
if ( $discount_total > 0 ) {
echo '<tr class="cart-savings">';
echo '<th>' . esc_html__( 'Total Savings:', 'text-domain' ) . '</th>';
echo '<td><strong>' . wc_price( $discount_total ) . '</strong></td>';
echo '</tr>';
}
}
add_action( 'fc_pro_checkout_review_order_before_order_total', 'add_savings_total_to_order_summary', 10 );
