WordPress at Your Fingertips
function is not described

WC_Order_Item_Product::set_backorder_meta() public WC 1.0

Set meta data for backordered products.

{} It's a method of the class: WC_Order_Item_Product{}

Return

null. Nothing.

Usage

$WC_Order_Item_Product = new WC_Order_Item_Product();
$WC_Order_Item_Product->set_backorder_meta();

Code of WC_Order_Item_Product::set_backorder_meta() WC 5.7.1

public function set_backorder_meta() {
	$product = $this->get_product();
	if ( $product && $product->backorders_require_notification() && $product->is_on_backorder( $this->get_quantity() ) ) {
		$this->add_meta_data( apply_filters( 'woocommerce_backordered_item_meta_name', __( 'Backordered', 'woocommerce' ), $this ), $this->get_quantity() - max( 0, $product->get_stock_quantity() ), true );
	}
}