WC_Abstract_Order::get_status
Return the order statuses without wc- internal prefix.
Method of the class: WC_Abstract_Order{}
Hooks from the method
Returns
String.
Usage
$WC_Abstract_Order = new WC_Abstract_Order(); $WC_Abstract_Order->get_status( $context );
- $context(string)
- View or edit context.
Default:'view'
WC_Abstract_Order::get_status() WC Abstract Order::get status code WC 10.7.0
public function get_status( $context = 'view' ) {
$status = $this->get_prop( 'status', $context );
if ( empty( $status ) && 'view' === $context ) {
/**
* In view context, return the default status if no status has been set.
*
* @since 3.0.0
*
* @param string $status Default status.
*/
$status = apply_filters( 'woocommerce_default_order_status', OrderStatus::PENDING );
}
return $status;
}