Advertisement
borkolivic

Dvojna cijena za custom meta

Aug 2nd, 2022
1,269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. function mx_show_custom_price() {
  2.         global $product;
  3.         $mx_product_custom_price = $product->get_meta ('cash_price');
  4.         $price_eur = convert_to_eur($mx_product_custom_price);
  5.         $formatted_price_eur = "<span class='woocommerce-Price-amount amount amount-eur'> <small>($price_eur €)</small> </span>";
  6.          echo "
  7.    <div id='price-container'>
  8.           <span id='price-text'>Neka druga cijena:</span> <span>". number_format($mx_product_custom_price, 2, ",", ".").' kn' .  $formatted_price_eur ."</span>
  9.    </div>
  10.    ";
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement