Automattic\WooCommerce\Internal\Orders
OrderAttributionController::output_origin_column()
Output the translated origin label for the Origin column in the orders table.
Default to "Unknown" if no origin is set.
Method of the class: OrderAttributionController{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->output_origin_column( $order );
- $order(WC_Order) (required)
- The order object.
OrderAttributionController::output_origin_column() OrderAttributionController::output origin column code WC 9.5.1
private function output_origin_column( WC_Order $order ) { $source_type = $order->get_meta( $this->get_meta_prefixed_field_name( 'source_type' ) ); $source = $order->get_meta( $this->get_meta_prefixed_field_name( 'utm_source' ) ); $origin = $this->get_origin_label( $source_type, $source ); echo esc_html( $origin ); }