How to modificate cell output of any column by its key
If you need to modificate output of any woocommerce field predefined in WOOT you can use next code:
add_action('woot_profile_extend', function($profile, $action_name) { if ($action_name === 'woot_woocommerce_tables') { $profile['on_sale']['action'] = function($post_id) { $product = WOOT_WooCommerce::get_product($post_id); if (is_object($product)) { return $product->is_on_sale() ? "<span class='your-class-here'>Yes</span>" : "<span class='your-class-here'>No</span>"; } }; } return $profile; }, 10, 2);
In the example you can see output modification of the column ‘on_sale‘.