1

I've set up the cartthrob_pre_process hook to look something like this:

public function cartthrob_pre_process($data)
{
    $data['subtotal'] = 500.00;
}

It then goes to PayPal, which is the selected gateway. But when I get there it's showing the old price. Am I going about this the wrong way? Should I be using a different hook?

1

IIRC, you should be able to do this:

ee()->cartthrob->cart->set_subtotal(500);

Or you may have to change the total to effect the price sent to PayPal:

ee()->cartthrob->cart->set_total(500);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.