/**
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
£188.00
Select options
This product has multiple variants. The options may be chosen on the product page
£121.00 – £186.00Price range: £121.00 through £186.00
Select options
This product has multiple variants. The options may be chosen on the product page
£168.51 – £185.21Price range: £168.51 through £185.21
Select options
This product has multiple variants. The options may be chosen on the product page
£185.00
Select options
This product has multiple variants. The options may be chosen on the product page
£173.00 – £185.00Price range: £173.00 through £185.00
Select options
This product has multiple variants. The options may be chosen on the product page
£11.00 – £179.00Price range: £11.00 through £179.00
Select options
This product has multiple variants. The options may be chosen on the product page
£128.00 – £179.00Price range: £128.00 through £179.00
Select options
This product has multiple variants. The options may be chosen on the product page
£23.00 – £177.00Price range: £23.00 through £177.00
Select options
This product has multiple variants. The options may be chosen on the product page
£83.00 – £177.00Price range: £83.00 through £177.00
Select options
This product has multiple variants. The options may be chosen on the product page
£74.00 – £175.00Price range: £74.00 through £175.00
Select options
This product has multiple variants. The options may be chosen on the product page
£172.00
Select options
This product has multiple variants. The options may be chosen on the product page
£169.00
Select options
This product has multiple variants. The options may be chosen on the product page