• Discovered a little bug.

    Can’t update/delete products from that cart page, when the address bar still contains the hash, i.e: https://domain.com/cart/?share={hash}

    This presumably happens as when updating the cart, the hashed URL reloads the saved-to-disk cart so suppressing any changes.

    Cleaning the hash param from the address bar fixes the issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter alx359

    (@alx359)

    This is a way to address this:

    public static function set_session_cart()
    {
      //if( isset($_REQUEST['share']) ) {
        if( isset($_REQUEST['share']) && empty($_SERVER['HTTP_REFERER']) ) {
    Thread Starter alx359

    (@alx359)

    I’ve also just added an usability tweak.

    public static function cart_item_price($wc, $cart_item, $cart_item_key)
    {
    //alx359: hide the edit fields in the checkout page as it can get confusing
    //if(current_user_can('manage_woocommerce')) {
    if(current_user_can('manage_woocommerce') && !is_checkout()) {

    It adds clutter and makes no sense IMO having editable fields in the checkout page, as the share this cart button inhabits the cart page only.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t update cart when hash param is present’ is closed to new replies.