WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
cart item data not saving (1 post)

  1. b747fp
    Member
    Posted 8 months ago #

    how come setting cart_item_data array doesn't save to the cart_contents loop...

    $cart=new WC_Cart();
    $cart->add_to_cart( $productID, 15, '', '', array('extraVar' => 'extra-value')  )
    foreach($cart->cart_contents as $key => $value){
         print_r($value);
    }

    no extraVar data is showing up at the cart loop

    http://wordpress.org/plugins/woocommerce/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.