woocommerce_backordered_item_meta_name

woocommerce_backordered_item_meta_name

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.9.5

apply_filters('woocommerce_backordered_item_meta_name') is found 3 times:

  • /includes/class-wc-order-item-product.php line 233
    	 */
    	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 );
    		}
    	}
    
    	/*
    	|--------------------------------------------------------------------------
    	| Getters
    
  • /includes/class-wc-order-item-product.php line 464
    			 * @param WC_Order_Item_Product $item The order item product.
    			 * @since 9.9.0
    			 * @return string
    			 */
    			$backorder_meta_key = apply_filters( 'woocommerce_backordered_item_meta_name', __( 'Backordered', 'woocommerce' ), $this );
    
    			foreach ( $formatted_meta as $meta_id => $meta ) {
    				if ( isset( $meta->key ) && $meta->key === $backorder_meta_key ) {
    					unset( $formatted_meta[ $meta_id ] );
    				}
    			}
    
  • /includes/legacy/abstract-wc-legacy-order.php line 167
     
    		// Handle qty if set.
    		if ( isset( $args['qty'] ) ) {
    			if ( $product->backorders_require_notification() && $product->is_on_backorder( $args['qty'] ) ) {
    				$item->add_meta_data( apply_filters( 'woocommerce_backordered_item_meta_name', __( 'Backordered', 'woocommerce' ), $item ), $args['qty'] - max( 0, $product->get_stock_quantity() ), true );
    			}
    			$args['subtotal'] = $args['subtotal'] ? $args['subtotal'] : wc_get_price_excluding_tax( $product, array( 'qty' => $args['qty'] ) );
    			$args['total']	= $args['total'] ? $args['total'] : wc_get_price_excluding_tax( $product, array( 'qty' => $args['qty'] ) );
    		}
    
    		$item->set_order_id( $this->get_id() );