WC_Product_External::set_backorders( string $backorders )

External products cannot be backordered.


Description Description


Parameters Parameters

$backorders

(Required) Options: 'yes', 'no' or 'notify'.


Top ↑

Source Source

File: includes/class-wc-product-external.php

	public function set_backorders( $backorders ) {
		$this->set_prop( 'backorders', 'no' );

		if ( 'no' !== $backorders ) {
			$this->error( 'product_external_invalid_backorders', __( 'External products cannot be backordered.', 'woocommerce' ) );
		}
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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