Woocommerce_Helpers::wc_order_statuses( string $label = null, string $option_code = 'WCORDERSTATUS' )


Parameters Parameters

$label

(string) (Optional)

Default value: null

$option_code

(string) (Optional)

Default value: 'WCORDERSTATUS'


Top ↑

Return Return

(mixed)


Source Source

File: src/integrations/woocommerce/helpers/woocommerce-helpers.php

	public function wc_order_statuses( $label = null, $option_code = 'WCORDERSTATUS' ) {

		if ( ! $this->load_options ) {


			return Automator()->helpers->recipe->build_default_options_array( $label, $option_code );
		}

		if ( ! $label ) {
			$label = 'Status';
		}

		$option = [
			'option_code' => $option_code,
			'label'       => $label,
			'input_type'  => 'select',
			'required'    => true,
			'options'     => wc_get_order_statuses(),
		];

		return apply_filters( 'uap_option_woocommerce_statuses', $option );
	}