Filter: tcp add item shopping cart

Description

“tcp_add_item_shopping_cart” allows to filter the data to add to the shopping cart.

Parameters

$args
(Array) List of data to add in the shoipping cart. Format:

i
Numeric Index in the request array
post_id
Numeric Identifier of the product (or Dynamic option)
count
Numeric Number of items to buy
unit_price
Numeric Unit price
unit_weight
Numeric Unit weight

Example

<?php
function my_tcp_add_item_shopping_cart( $args ) {
	$args['unit_price'] += 10;
	return $args;
}
add_filter( 'tcp_add_item_shopping_cart', 'my_tcp_add_item_shopping_cart' ); ?>

Change log

Since 1.0.4