Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xlplugins/1ca9fde1bf44524d6676e980507dd8da to your computer and use it in GitHub Desktop.
Save xlplugins/1ca9fde1bf44524d6676e980507dd8da to your computer and use it in GitHub Desktop.
Funnelkit Cart: Display Total Row after order summary
class FKCART_Order_Total_Row{
public function __construct() {
add_action('fkcart_after_order_summary',[$this,'order_total_row']);
}
public function order_total_row($front) {
$total_amount="";
if ( ! is_null( WC()->session ) && ! is_null( WC()->cart ) ) {
$total_amount = WC()->cart->get_total();
}
if(empty($total_amount)){
return;
}
?>
<div class="fkcart-summary-line-item fkcart-total-wrap ">
<div class="fkcart-summary-text"><strong><?php esc_html_e( 'Total', 'woocommerce' ) ?></strong></div>
<div class="fkcart-summary-amount"><strong><?php echo wp_kses_post( $total_amount ) ?></strong></div>
</div>
<?php
}
}
new FKCART_Order_Total_Row();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment