Okay
  Public Ticket #3428980
Is the status of the order that gets the commission customizable?
Closed

Comments

  • Franster started the conversation

    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?

  •  1,906
    WebWizards replied

    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://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/


    Kind regards,

    Thomas

  • kevin replied

    beunas venta un error 

    4187112126.png
  •  1,906
    WebWizards replied

    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