Ejemplo n.º 1
0
    public static function column_display($column_name, $post_id)
    {
        switch ($column_name) {
            case 'price':
                /* Custom inline data for nyp */
                $nyp = get_post_meta($post_id, '_nyp', true);
                $suggested = WC_Name_Your_Price_Helpers::get_suggested_price($post_id);
                $suggested = wc_format_localized_price($suggested);
                $min = WC_Name_Your_Price_Helpers::get_minimum_price($post_id);
                $min = wc_format_localized_price($min);
                $is_nyp_allowed = has_term(array('simple'), 'product_type', $post_id) ? 'yes' : 'no';
                echo '
					<div class="hidden" id="nyp_inline_' . $post_id . '">
						<div class="nyp">' . $nyp . '</div>
						<div class="suggested_price">' . $suggested . '</div>
						<div class="min_price">' . $min . '</div>
						<div class="is_nyp_allowed">' . $is_nyp_allowed . '</div>
					</div>
				';
                break;
        }
    }