backend_settings_discounts
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.
Shop-Script
Input (passed by reference)
No specific parameters.
… your plugin code …
Output
$return
Shop-Script
Plugin code example
PHP
public function backendSettingsDiscounts()
{
return [
[
'name' => _wp('My discount setting'),
'id' => $this->getId() . '_discount',
'url' => '?plugin=' . '&module=backend&action=settings',
'status' => $this->getSettings($this->getId() . '_discount_status'),
],
];
}









