Adds custom discount settings options. A plugin must return either a single array, or an array of sub-arrays. Each sub-array must have the following structure: 1) 'id' (string) => optional discount type ID; if not specified, plugin ID is used by default. 2) 'name' (string) => mandatory discount type name. 3) 'url' (string) => mandatory URL from which HTML source should be retrieved for the settings page. 4) 'status' (bool) => optional flag denoting whether this discount type is enabled or disabled (if not specified, defaults to false). 5) 'html' (string) => optional portion of HTML code displayed at the bottom of settings screen for this discount type.


Input (passed by reference)

No specific parameters.
… your plugin code …



Plugin code example


public function backendSettingsDiscounts()
    return array(
            'name'   => _wp('My discount setting'),
            'id'     => 'myplugin_discount',
            'url'    => '?plugin=myplugin&module=backend&action=settings',
            'status' => $this->getSettings('myplugin_discount_status'), //discount status setting control must be implemented by plugin developer using action class requested at URL specified in 'url' field in this array