Plugin Directory

Changeset 3150596


Ignore:
Timestamp:
09/12/2024 08:06:29 AM (16 months ago)
Author:
RealMag777
Message:

fix for function woocs_get_custom_price_html()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-currency-switcher/trunk/classes/woocs.php

    r3148508 r3150596  
    46024602                $custom_prices = array_unique($custom_prices);
    46034603                foreach ($custom_prices as $p) {
    4604                     if (!isset($currencies[$p['currency']])) {
    4605                         $p['currency'] = $this->default_currency;
    4606                     }
    4607                    
     4604
     4605                    $curr = sanitize_key($p['currency']);
     4606
     4607                    //check for currency existance
     4608                    if (!isset($currencies[$curr])) {
     4609                        $curr = $this->default_currency;
     4610                    }
     4611
    46084612                    $result[$p['value']] = do_shortcode("[woocs_show_custom_price "
    4609                             . "value=" . sanitize_text_field($p['value'])
     4613                            . "value=" . floatval($p['value'])
    46104614                            . " decimals=" . intval($p['decimals'])
    4611                             . " currency=" . sanitize_text_field($p['currency'])
     4615                            . " currency=" . $curr
    46124616                            . " ]");
    46134617                }
Note: See TracChangeset for help on using the changeset viewer.