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'


Top ↑

Return Return

(string)


Top ↑

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;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.