• Resolved loxlie

    (@loxlie)


    I understand the plugin creates a temporary cart session while creating the order, and that it clears the cart for the customer (the “switched user”). It does seem to leave the contents in the basket for the user that created the order though.
    I’ve tried:

    add_action('wpo_order_created', function()
    ? ? {
    ? ? WC()->cart->empty_cart();
    ? ? }, PHP_INT_MAX);

    But it has no effect.
    Ideally the whole process would be done within the context of the switched user (don’t know it that’s possible). But could you clear the cart of the current user?
    Best wishes.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cart contents remains for current user’ is closed to new replies.