WordPress.org

Forums

WooCommerce - excelling eCommerce
How do I add a value to the $values array? (1 post)

  1. TimoVeld
    Member
    Posted 1 year ago #

    I'm trying to get my own custo`m value in the $values array, but I'm having some trouble to find out where the array is actually build.

    I think I need to edit class-wc-cart.php, but if I just add my variable to

    $this->cart_contents[$cart_item_key] = apply_filters( 'woocommerce_add_cart_item', array_merge( $cart_item_data, array(
    'product_id' => $product_id,
    'variation_id' => $variation_id,
    'variation' => $variation,
    'quantity' => $quantity,
    'data' => $product_data
    ) ), $cart_item_key );`

    I get an error. So I was wondering where the $values array is actually build, and how to add a custom value.

    http://wordpress.org/extend/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