/** * Returns the singleton instance of the prices manager. * * @return WC_Aelia_CurrencyPrices_Manager */ public static function Instance() { if (empty(self::$instance)) { self::$instance = new WC_Aelia_CurrencyPrices_Manager(); } return self::$instance; }
<?php if (!defined('ABSPATH')) { exit; } // Exit if accessed directly use Aelia\WC\CurrencySwitcher\Subscriptions\Subscriptions_Integration; use Aelia\WC\CurrencySwitcher\Subscriptions\WC_Aelia_CS_Subscriptions_Plugin; $currencyprices_manager = WC_Aelia_CurrencyPrices_Manager::instance(); $enabled_currencies = WC_Aelia_CurrencySwitcher::settings()->get_enabled_currencies(); $base_currency = WC_Aelia_CurrencySwitcher::settings()->base_currency(); // The text domain for translations $text_domain = WC_Aelia_CS_Subscriptions_Plugin::$text_domain; $post_id = $currencyprices_manager->current_post->ID; echo '<div id="wc_aelia_cs_subscription_prices" class="clearfix show_if_subscription">'; // Debug echo 'DEBUG - SUBSCRIPTION'; // Display header of currency pricing section include 'currencyprices_header.php'; $product_regular_prices = $currencyprices_manager->get_product_regular_prices($post_id); $product_sale_prices = $currencyprices_manager->get_product_sale_prices($post_id); $signup_prices = Subscriptions_Integration::get_subscription_signup_prices($post_id); echo '<table>'; echo '<tr>'; echo '<th>'; echo '</th>'; echo '<th>'; echo __('Regular price', $text_domain); echo '</th>'; echo '<th>'; echo __('Sale price', $text_domain);