Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created June 25, 2026 12:31
Show Gist options
  • Select an option

  • Save xlplugins/3cb3e021e531553fe12c17920963c587 to your computer and use it in GitHub Desktop.

Select an option

Save xlplugins/3cb3e021e531553fe12c17920963c587 to your computer and use it in GitHub Desktop.
exclude shipping in cart summary
// FKCart: show recurring total as product price + tax only (no shipping), subscriptions only.
add_action( 'fkcart_after_order_summary', function () {
if ( empty( WC()->cart->recurring_carts ) ) {
return;
}
foreach ( WC()->cart->recurring_carts as $recurring_cart ) {
$recurring_cart->set_total( (float) $recurring_cart->get_subtotal() + (float) $recurring_cart->get_subtotal_tax() );
}
}, 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment