Skip to main content

fc_pro_after_cart_section_{section_id}

Type: Action

Fires after the contents of a cart section.

The dynamic portion of the hook name, $section_id, is the cart section ID. Possible hook names include:

  • fc_pro_after_cart_section_cart_items
  • fc_pro_after_cart_section_coupon_code
  • fc_pro_after_cart_section_cross_sell_display
  • fc_pro_after_cart_section_free-gifts-for-woocommerce_display
  • fc_pro_after_cart_section_gift_card_code
  • fc_pro_after_cart_section_shipping
  • fc_pro_after_cart_section_woodmart-free-gifts_display

Signature​

do_action( 'fc_pro_after_cart_section_{section_id}', $section_id );

Parameters​

NameTypeDescription
$section_idstringSection ID.

Since​

  • 1.3.0

Source: inc/cart-page.php

Examples​

In fc_pro_after_cart_section_{section_id}, cart_items replaces {section_id}.

add_action( 'fc_pro_after_cart_section_cart_items',
/**
* Add promotional banner after cart items section.
*
* @param string $section_id Section ID.
*/
function( $section_id ) {
echo '<div class="promotional-banner">';
echo '<p>' . esc_html__( 'Free shipping on orders over $50!', 'text-domain' ) . '</p>';
echo '</div>';
},
10
);