'[actual-price]', 'Price without decimals:' => '[actual-price show-decimal=false]', 'Display only cents:' => '[actual-price show-only-decimal=true]', 'Treat custom field as a price:' => 'Treat custom field as a price:', 'Disable currency symbol:' => '[cf=_price disable-currency=true]', 'Calculate discount (%) from 2 prices:' => '[discount old-price="_regular_price" new-price="_sale_price"]', ); public $display_name = 'Actual price'; public function getValue($post, $field) { $product = (new \WC_Product_Factory())->get_product($post->ID); return !empty($product) ? $this->getValueWithCurrency($product->get_price(), $field) : ''; } }