WC_Abstract_Order::get_status( string $context = 'view' )
Return the order statuses without wc- internal prefix.
Description Description
Parameters Parameters
- $context
-
(Optional) View or edit context.
Default value: 'view'
Return Return
(string)
Source Source
File: includes/abstracts/abstract-wc-order.php
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; }