• Resolved jleung1994

    (@jleung1994)


    Hi,
    The product attribute appended to the product name does not update on the Cart and Checkout page.
    I shortened the product attribute name and slug. It updated on the product page, but still shows the older attribute on the Cart and Checkout page product name.

    It doesn’t seem to do this for all the new products (products updated or created after the update to 3.0).

    How can I fix this?

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

    (@jleung1994)

    Seems like after I updated it “Virtual” product once, the product attribute doesn’t append to the product title. Even if I change it back to no virtual, it still show the attribute separately.
    It also seems to update the attribute when I change it to virtual product.

    However, using this code in functions.php doesn’t seem to update the attribute or product name on the Cart and Checkout page like when I edited with admin.

    // Update Virtual Products
    function woo_virtual_product($post_id)
    {
    $children = get_posts(array(
    'post_type'      => 'product_variation',
    'posts_per_page' => -1,
    'post_status'    => 'publish',
    ));
    
    foreach ($children as $thischild) {
    update_post_meta($thischild->ID, '_virtual', 'yes');
    }
    wp_reset_postdata();
    }
    
    add_filter('init', 'woo_virtual_product', 10, 1);
    Thread Starter jleung1994

    (@jleung1994)

    ok. I seem to be able to fix the attribute by doing a bulk edit product category update (even though that category is already added).
    However, the attribute name doesn’t append to the product name like before.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Attribute / Variation not updated on Cart and Checkout page’ is closed to new replies.