I use the pay.me plugin to make my sales through the card. When the plugin adds interest to parcels, they are not printed on the Thank You page.
I am using the following line of code to try to add interest above the 7th installment in the total amount of the purchase, however the value does not update ... could anyone help me?
if ( $installment['installment'] <= $this->gateway->max_installment && $smallest_installment <= $installment['installment_amount'] )
{
$data['installments'] = $installment['installment'];
if ( $data['installments'] >= 7 )
{
$data['amount'] = ceil ( $installment['amount'] * 1.052631578947368 ) ;
}
function get_cart_total()
{
if ( $data['installments'] >= 7 )
{
$cart_contents_total = wc_price( $this->get_total() * 2 );
}
return apply_filters( 'woocommerce_cart_contents_total', $cart_contents_total );
}
$data['amount'] = $installment['amount'];
}