add one or more key/value pairs to the line item data array.

shopp_add_order_line_data ( $order, $line, $data )

@param int $order the order id
@param int $line the order line item
@param array $data new key/value pairs to add to the line item
@return bool true on success, false on failure


add one or more key=>value pairs to the line item data array.

The specified data is merged with existing data.


// get order line-items from order 25
$purchases = shopp_order_lines( 25 );

// add gift-wrapping data entry to special item
foreach ( $purchases as $i => $item ) {
    if ( "Special Item" == $item->name ) {
        // add date entry to line
        shopp_add_order_line_data( 25, $i, array( 'Gift Wrap' => 'yes' ) )

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.