Skip to content

Instantly share code, notes, and snippets.

@robertdevore
Last active December 4, 2019 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertdevore/8da936c49505bd6c2dec649a8407bb1d to your computer and use it in GitHub Desktop.
Save robertdevore/8da936c49505bd6c2dec649a8407bb1d to your computer and use it in GitHub Desktop.
Change the order statuses used when auto-assigning a driver in the Delivery Drivers for WooCommerce Pro plugin
<?php
/**
* Auto-assign drivers order statuses
*
* This filter can be used to change the order statuses that are used when auto-assigning
* the driver after the order has been successfully placed.
*
* @author Robert DeVore <deviodigital@gmail.com>
* @link https://deviodigital.com/product/delivery-drivers-for-woocommerce-pro/
* @return array
*/
function acme_assign_drivers_order_statuses( $statuses ) {
$statuses = array(
'processing',
'another-one-here'
);
return $statuses;
}
add_filter( 'ddwc_pro_assign_drivers_order_statuses', 'acme_assign_drivers_order_statuses' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment