Description
Filters the statuses available for commissions.
Parameters
$statuses
(array) The available statuses for commissions.
Example
Let’s say you want to add a new status for commissions to have, namely “Processing”.
The only thing you’d need to do is add a new element to the $statuses
array, with your custom slug, in this case processing
, and your custom name for the status, in this case Processing
.
function register_custom_commission_status( $statuses ) {
$statuses['processing'] => 'Processing';
return $statuses;
}
add_filter( 'slicewp_commission_available_statuses', 'register_custom_commission_status' );
Important note: SliceWP uses the following 4 statuses within the core plugin and its add-ons for various functionality: unpaid, paid, pending, rejected.
Please make sure you don’t unset any of these 4 statuses when altering the commission available statuses array.
You can modify the values of the array elements without any issues (for example, if you feel the names don’t fit your affiliate program), however the keys must remain in place.