rtec_payments_line_items
is a filter for dynamically adding or changing line items right before checkout.
Usage
<?php add_filter( 'rtec_payments_line_items', 'function_name', 10, 2 ); ?>
Parameters
$line_items – (array) Line items including cost, label, and quantity.
$payment_data – (array) Data associated with the registration, event, and payment.
Changelog
Pro
2.0 – introduced
Example: Add an Additional Processing Fee
function ru_add_processing_fee( $line_items, $payment_data ) {
$line_items['processing_fee'] = array(
'cost' => 2,
'label' => 'Processing Fee',
'quantity' => ''
);
return $line_items;
}
add_filter( 'rtec_payments_line_items', 'ru_add_processing_fee', 10, 2 );