/**
Thermofrost - Read-only Madics column.
No changes to orders, users or payments. */
if ( ! function_exists( 'tf_madics_order_column' ) ) {
function tf_madics_order_column( $columns ) {
$columns['tf_madics_code'] = 'Madics Code';
return $columns;
}
function tf_madics_column_value( $column, $order_or_id ) {
if ( 'tf_madics_code' !== $column ) {
return;
}
if ( ! function_exists( 'wc_get_order' ) ) {
return;
}
$order = $order_or_id instanceof WC_Order
? $order_or_id
: wc_get_order( $order_or_id );
if ( ! $order ) {
return;
}
$user_id = $order->get_customer_id();
if ( ! $user_id ) {
echo '—';
return;
}
$keys = array(
'madics_customer_code',
'madics_code',
'_madics_customer_code',
'_madics_code'
);
$code = '';
foreach ( $keys as $key ) {
$value = get_user_meta( $user_id, $key, true );
if ( is_scalar( $value ) && trim( (string) $value ) !== '' ) {
$code = (string) $value;
break;
}
}
echo $code !== ''
? esc_html( $code )
: '—';
}
add_filter(
'manage_woocommerce_page_wc-orders_columns',
'tf_madics_order_column'
);
add_action(
'manage_woocommerce_page_wc-orders_custom_column',
'tf_madics_column_value',
10,
2
);
add_filter(
'manage_edit-shop_order_columns',
'tf_madics_order_column'
);
add_action(
'manage_shop_order_posts_custom_column',
'tf_madics_column_value',
10,
2
);
}
Skip to navigation
Skip to main content
£5.00 – £209.00Price range: £5.00 through £209.00
Select options
This product has multiple variants. The options may be chosen on the product page
£206.00
Select options
This product has multiple variants. The options may be chosen on the product page
£141.00 – £206.00Price range: £141.00 through £206.00
Select options
This product has multiple variants. The options may be chosen on the product page
£204.00
Select options
This product has multiple variants. The options may be chosen on the product page
£145.00 – £204.00Price range: £145.00 through £204.00
Select options
This product has multiple variants. The options may be chosen on the product page
£17.00 – £203.00Price range: £17.00 through £203.00
Select options
This product has multiple variants. The options may be chosen on the product page
£202.00
Select options
This product has multiple variants. The options may be chosen on the product page
Select options
This product has multiple variants. The options may be chosen on the product page
£199.00
Select options
This product has multiple variants. The options may be chosen on the product page
£72.00 – £196.00Price range: £72.00 through £196.00
Select options
This product has multiple variants. The options may be chosen on the product page
£194.00
Select options
This product has multiple variants. The options may be chosen on the product page
£70.00 – £194.00Price range: £70.00 through £194.00
Select options
This product has multiple variants. The options may be chosen on the product page