retrieve one or or all order data entries

shopp_order_data ( $order, $name )

@param int $order the order id from which to retrieve the data entry
@param string $name (optional) the key/index of the data entry to retrieve from the data, false for the whole array
@return mixed one named order data value, or an array of data, false if no value can be found


retrieve one or or all order data entries


all order data entries

// order data of order 101
$data = shopp_order_data( 101 );

foreach ( $data as $name => $value ) {
    // use order data

specified entry key/name

// get data entry named Terms and Conditions from order 102
$value = shopp_order_data( 102, 'Terms and Conditions' );

if ( "accepted" == $value ) {
    // do code if they accepted your terms

See Also

You must be logged in to post a comment.

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