WC_Abstract_Order::get_status()
Return the order statuses without wc- internal prefix.
Method of the class: WC_Abstract_Order{}
Hooks from the method
Return
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 8.6.1
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. $status = apply_filters( 'woocommerce_default_order_status', 'pending' ); } return $status; }