<?php
/**
* Add your custom order statuses to sales snippet or count triggers
*/
if ( ! function_exists( 'theme_modify_wcst_custom_wc_order_states' ) ) {
add_filter( 'wcst_modify_wc_order_states', 'theme_modify_wcst_custom_wc_order_states', 90 );
/**
* Hooked into `wcst_modify_wc_order_states`
*
* @param $states Existing WC Order States
*
* @return mixed
*/
function theme_modify_wcst_custom_wc_order_states( $states ) {
/** Already included order states: "wc-processing", "wc-on-hold" & "wc-completed" */
/** If you want to include 'pending' order state */
array_push( $states, 'wc-pending' );
/** add array_push multiple times if you want to include multiple order status */
return $states;
}
}