WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. TimoVeld
    Member
    Posted 10 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic