Public Ticket #3428980

Is the status of the order that gets the commission customizable?

Closed
Comments
2 Tickets
Franster started the conversation 3 years ago on August 3, 2023 at 10:35am

I'm planning to customize woocommerce to add new order status called complete, id = complete-1, and I'm planning to assign the final status of my order as complete-1 to this order status. But if I customize the new order status, salesking users will not be able to get commissions normally, because salesking only considers that the original order status of woocommerce is completed, and then the commission will be issued. If I only change the order status to completed -1 , then the user won't get commission again.

Can salesking customize which order statuses can earn commissions?

Or does salesking provide any hooks to customize the code so that salesking recognizes my newly created order status (completed-1) as an order status that can be commissioned?

2,762
KingsPlugins replied 3 years ago on August 4, 2023 at 10:51am

Hi there,

Thanks for getting in touch,


Can salesking customize which order statuses can earn commissions?

You can achieve that by adding this PHP code snippet to your site:

add_filter('salesking_earning_completed_statuses', function($statuses){
      $statuses = array('completed', 'complete-1');
      return $statuses;
}, 10, 1);

A PHP snippet can be added to functions.php, or by following our guide here: https://b2bkingplugin.com/docs/how-to-add-a-snippet-php-or-js/

Kind regards,

Thomas

2,762
KingsPlugins replied 3 years ago on November 30, 2023 at 4:01am

Hi Kevin,

It seems that the tool you are using to translate to Spanish also translated the code. Please note the code must be in English, it should look like this:

2690171719.png

Kind regards,

Stefan

Sign In