shopp_product_set_donation()

sets the minimum donation and the variable donation flags for a single donation product.

shopp_product_set_donation ( $product, $settings )

@param int $product (required) The Product id to set donation settings on.
@param array $settings (required) The array of settings (minimum => bool, variable => bool), to set price as minimum donation flag and variable donation amounts flag.
@return bool true on success, false on failure

Description

sets the minimum donation and the variable donation flags for a single donation product.

This function uses shopp_product_variant_set_donation().

Example

// set the donation settings on a Donation type product
$settings = array(
    'minimum' => true, // when true the base donation amount is the minimum donation accepted.
    'variable' => true // when true the customer can enter their own donation value amount.
);

shopp_product_set_donation ( 3, $settings );

See Also

You must be logged in to post a comment.

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

Skip to toolbar