woocommerce_purchase_order_item_types

woocommerce_purchase_order_item_types

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_purchase_order_item_types') is found 2 times:

  • /src/Blocks/BlockTypes/OrderConfirmation/Totals.php line 103
    	protected function render_order_details_table_items( $order ) {
    		$return      = '';
    		$order_items = array_filter(
    		// phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    			$order->get_items( apply_filters( 'woocommerce_purchase_order_item_types', 'line_item' ) ),
    			function( $item ) {
                    // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    				return apply_filters( 'woocommerce_order_item_visible', true, $item );
    			}
    		);
    
    
  • /templates/order/order-details.php line 30
    if ( ! $order ) {
    	return;
    }
    
    $order_items        = $order->get_items( apply_filters( 'woocommerce_purchase_order_item_types', 'line_item' ) );
    $show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) );
    $downloads          = $order->get_downloadable_items();
    
    // We make sure the order belongs to the user. This will also be true if the user is a guest, and the order belongs to a guest (userID === 0).
    $show_customer_details = $order->get_user_id() === get_current_user_id();