WOOT - WooCommerce Active Products Tables

Cyber Monday 2021
Cyber Monday 2021 timer

woot_meta_data_cell

This hooks allows to manipulate with meta data display in the table cell.

Example:

add_action('woot_meta_data_cell', function($value, $meta_data, $post_id, $table_id) {

    if ($meta_data['meta_key'] === 'meta_1' AND $table_id === 21) {
        $value = floatval($value) * floatval(get_post_meta($post_id, 'meta_2', true));
    }

    return $value;
}, 10, 4);

In this example shows mathematical operation for some meta fields which can has your site business logic.