Jump to content

Default currency works only after browser refresh


Recommended Posts

Good day

Added a new hook as per below:


use WHMCS\Session;

add_hook('ClientAreaPageCart', 1, function($vars) {
    // Provide your new default currency ID
    $currencyId = 2;

    if (!Session::get('uid') && !Session::get('currency')) {
        Session::set('currency', $currencyId);


The default currency only changes when I press F5 on the browser.  Can you please assist me what I am missing to force the hook to load?


Thank you


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated