WordPress.org

Forums

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

  1. b747fp
    Member
    Posted 1 year 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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.