woocommerce_purchase_note_order_statuses

woocommerce_purchase_note_order_statuses

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_purchase_note_order_statuses') is found 2 times:

  • /src/Blocks/BlockTypes/OrderConfirmation/Totals.php line 177
    	 * @return string
    	 */
    	protected function render_order_details_table_item_purchase_note( $order, $product ) {
    		// phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    		$show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) );
    		$purchase_note      = $product ? $product->get_purchase_note() : '';
    
    		return $show_purchase_note && $purchase_note ? '<div class="product-purchase-note">' . wp_kses_post( $purchase_note ) . '</div>' : '';
    	}
    
    	/**
    
  • /templates/order/order-details.php line 31
    	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();
    
    if ( $show_downloads ) {