Skip to content
Docs
Get RestroPress

Action

rpress_cart_fee_rows_before

Updated
On this page

Fires at the start of each fee row in the checkout cart table.

Runs for every fee in the cart, inside its tr element and before the label cell.

Parameters#

ParameterTypeDescription
$fee_idstringThe fee ID, the key from rpress_get_cart_fees().
$feearrayThe fee data, with keys such as label, amount and type.

Example#

function my_fee_row_before( $fee_id, $fee ) {
	echo '<td class="my-fee-id">' . esc_html( $fee_id ) . '</td>';
}
add_action( 'rpress_cart_fee_rows_before', 'my_fee_row_before', 10, 2 );

Notes#

The label cell uses colspan 3, so extra cells can change the table layout.

Source#

Fired from:

  • templates/checkout_cart.php (line 177)

See also#

Was this page helpful?