Add filter for order milestone statuses.

This commit is contained in:
Jeff Stieler 2019-03-26 09:37:48 -06:00
parent b9e02d0b61
commit 632e4fd09d
1 changed files with 9 additions and 0 deletions

View File

@ -78,6 +78,15 @@ class WC_Admin_Notes_Order_Milestones {
* This is required for retrieving the order count.
*/
public function __construct() {
/**
* Filter Order statuses that will count towards milestones.
*
* @since 3.5.0
*
* @param array $allowed_statuses Order statuses that will count towards milestones.
*/
$this->allowed_statuses = apply_filters( 'woocommerce_admin_order_milestone_statuses', $this->allowed_statuses );
add_action( 'woocommerce_after_register_post_type', array( $this, 'init' ) );
}