fc_pro_before_cart_section_{section_id}
Type: Action
Fires before 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_before_cart_section_cart_itemsfc_pro_before_cart_section_coupon_codefc_pro_before_cart_section_cross_sell_displayfc_pro_before_cart_section_free-gifts-for-woocommerce_displayfc_pro_before_cart_section_gift_card_codefc_pro_before_cart_section_shippingfc_pro_before_cart_section_woodmart-free-gifts_display
Signature
do_action( 'fc_pro_before_cart_section_{section_id}', $section_id );
Parameters
| Name | Type | Description |
|---|---|---|
$section_id | string | Section ID. |
Since
1.3.0
Source: inc/cart-page.php
Examples
In fc_pro_before_cart_section_{section_id}, cart_items replaces {section_id}.
add_action( 'fc_pro_before_cart_section_cart_items',
/**
* Add promotional banner before 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
);