public static function instance()
 {
     if (self::$instance == null) {
         self::$instance = new WC_Dynamic_Pricing_Simple_Membership('simple_membership');
     }
     return self::$instance;
 }
 public function __construct()
 {
     add_action('woocommerce_cart_loaded_from_session', array(&$this, 'on_cart_loaded_from_session'), 99, 1);
     //Add the actions dynamic pricing uses to trigger price adjustments
     add_action('woocommerce_before_calculate_totals', array(&$this, 'on_calculate_totals'), 99, 1);
     if (is_admin()) {
         require 'admin/admin-init.php';
     }
     //Include additional integrations
     if (wc_dynamic_pricing_is_groups_active()) {
         include 'integrations/groups/groups.php';
     }
     //Paypal express
     include 'integrations/paypal-express.php';
     include 'classes/class-wc-dynamic-pricing-compatibility.php';
     if (!is_admin() || defined('DOING_AJAX')) {
         //Include helper classes
         include 'classes/class-wc-dynamic-pricing-counter.php';
         include 'classes/class-wc-dynamic-pricing-tracker.php';
         include 'classes/class-wc-dynamic-pricing-cart-query.php';
         include 'classes/class-wc-dynamic-pricing-adjustment-set.php';
         include 'classes/class-wc-dynamic-pricing-adjustment-set-category.php';
         include 'classes/class-wc-dynamic-pricing-adjustment-set-product.php';
         include 'classes/class-wc-dynamic-pricing-adjustment-set-totals.php';
         //The base pricing module.
         include 'classes/modules/class-wc-dynamic-pricing-module-base.php';
         //Include the advanced pricing modules.
         include 'classes/modules/class-wc-dynamic-pricing-advanced-base.php';
         include 'classes/modules/class-wc-dynamic-pricing-advanced-product.php';
         include 'classes/modules/class-wc-dynamic-pricing-advanced-category.php';
         include 'classes/modules/class-wc-dynamic-pricing-advanced-totals.php';
         //Include the simple pricing modules.
         include 'classes/modules/class-wc-dynamic-pricing-simple-base.php';
         include 'classes/modules/class-wc-dynamic-pricing-simple-product.php';
         include 'classes/modules/class-wc-dynamic-pricing-simple-category.php';
         include 'classes/modules/class-wc-dynamic-pricing-simple-membership.php';
         //Include the UX module - This controls the display of discounts on cart items and products.
         include 'classes/class-wc-dynamic-pricing-frontend-ux.php';
         //Boot up the instances of the pricing modules
         $modules['advanced_product'] = WC_Dynamic_Pricing_Advanced_Product::instance();
         $modules['advanced_category'] = WC_Dynamic_Pricing_Advanced_Category::instance();
         $modules['simple_product'] = WC_Dynamic_Pricing_Simple_Product::instance();
         $modules['simple_category'] = WC_Dynamic_Pricing_Simple_Category::instance();
         $modules['simple_membership'] = WC_Dynamic_Pricing_Simple_Membership::instance();
         if (wc_dynamic_pricing_is_groups_active()) {
             include 'integrations/groups/class-wc-dynamic-pricing-simple-group.php';
             $modules['simple_group'] = WC_Dynamic_Pricing_Simple_Group::instance();
         }
         $modules['advanced_totals'] = WC_Dynamic_Pricing_Advanced_Totals::instance();
         $this->modules = apply_filters('wc_dynamic_pricing_load_modules', $modules);
         /* Boot up required classes */
         //Initialize the dynamic pricing counter.  Records various counts when items are restored from session.
         WC_Dynamic_Pricing_Counter::register();
         //Initialize the FrontEnd UX modifications
         WC_Dynamic_Pricing_FrontEnd_UX::init();
         //Filters for simple adjustment types
         //add_filter( 'woocommerce_grouped_price_html', array(&$this, 'on_price_html'), 10, 2 );
         //add_filter( 'woocommerce_sale_price_html', array(&$this, 'on_price_html'), 10, 2 );
         //add_filter( 'woocommerce_price_html', array(&$this, 'on_price_html'), 10, 2 );
         //add_filter( 'woocommerce_empty_price_html', array(&$this, 'on_price_html'), 10, 2 );
         //Dont think the following filter is required, because regular get price filter is also called.
         //add_filter( 'woocommerce_variable_price_html', array($this, 'on_price_html'), 10, 2 );
         //add_filter( 'woocommerce_variable_sale_price_html', array($this, 'on_price_html'), 10, 2 );
         //Filters the variation price displayed when a variation is selected.
         add_filter('woocommerce_variation_price_html', array(&$this, 'on_price_html'), 10, 2);
         //add_filter( 'woocommerce_variation_sale_price_html', array(&$this, 'on_price_html'), 10, 2 );
         add_filter('woocommerce_get_variation_price', array($this, 'on_get_variation_price'), 10, 4);
         add_filter('woocommerce_get_price_html', array(&$this, 'on_price_html'), 10, 2);
         add_filter('woocommerce_get_price', array($this, 'on_get_price'), 10, 2);
     }
     add_filter('woocommerce_dynamic_pricing_get_rule_amount', array($this, 'convert_decimals'), 99, 4);
 }