promo_rule_types
Allows adding custom types of tools to promo settings in the “Marketing” section.
Shop-Script
Input (passed by reference)
No specific parameters.
… your plugin code …
Output
$return['type']
String ID of a custom tool type like the standard 'banner' or 'coupon'; e.g., 'my_tool_type'.
$return['name']
Localized name of a custom tool type displayed in promo settings.
$return['css_class']
CSS class name of the '.icon16' icon displayed next to the tool type name.
Shop-Script
Plugin code example
PHP
public function promoRuleTypes()
{
return [
[
'type' => 'my_rule_type',
'name' => _wp('My tool'),
'css_class' => 'fas fa-user',
]
];
}









