/** * @package Freemius for EDD Add-On * @copyright Copyright (c) 2015, Freemius, Inc. * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 * @since 1.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } class FS_Pricing extends FS_Entity { #region Properties /** * @var number */ public $plan_id; /** * @var int */ public $licenses; /** * @var null|float */ public $monthly_price; /** * @var null|float */ public $annual_price; /** * @var null|float */ public $lifetime_price; /** * @author Leo Fajardo (@leorw) * @since 2.3.1 * * @var string One of the following: `usd`, `gbp`, `eur`. */ public $currency; #endregion Properties /** * @param object|bool $pricing */ function __construct( $pricing = false ) { parent::__construct( $pricing ); } static function get_type() { return 'pricing'; } /** * @author Vova Feldman (@svovaf) * @since 1.1.8 * * @return bool */ function has_monthly() { return ( is_numeric( $this->monthly_price ) && $this->monthly_price > 0 ); } /** * @author Vova Feldman (@svovaf) * @since 1.1.8 * * @return bool */ function has_annual() { return ( is_numeric( $this->annual_price ) && $this->annual_price > 0 ); } /** * @author Vova Feldman (@svovaf) * @since 1.1.8 * * @return bool */ function has_lifetime() { return ( is_numeric( $this->lifetime_price ) && $this->lifetime_price > 0 ); } /** * Check if unlimited licenses pricing. * * @author Vova Feldman (@svovaf) * @since 1.1.8 * * @return bool */ function is_unlimited() { return is_null( $this->licenses ); } /** * Check if pricing has more than one billing cycle. * * @author Vova Feldman (@svovaf) * @since 1.1.8 * * @return bool */ function is_multi_cycle() { $cycles = 0; if ( $this->has_monthly() ) { $cycles ++; } if ( $this->has_annual() ) { $cycles ++; } if ( $this->has_lifetime() ) { $cycles ++; } return $cycles > 1; } /** * Get annual over monthly discount. * * @author Vova Feldman (@svovaf) * @since 1.1.8 * * @return int */ function annual_discount_percentage() { return floor( $this->annual_savings() / ( $this->monthly_price * 12 * ( $this->is_unlimited() ? 1 : $this->licenses ) ) * 100 ); } /** * Get annual over monthly savings. * * @author Vova Feldman (@svovaf) * @since 1.1.8 * * @return float */ function annual_savings() { return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses ); } /** * @author Leo Fajardo (@leorw) * @since 2.3.1 * * @return bool */ function is_usd() { return ( 'usd' === $this->currency ); } } Wealth Project https://validator.w3.org/feed/docs/rss2.html <description>Experience the thrill of gaming at CasinoXO Online Casino UK. Explore a wide range of games, exciting promotions, and a user-friendly interface.</description> What are Eco Rooms? Welcome to 1st Alarms Casino & Sportsbook <description>Explore the exciting world of online casino Rolling Slots. Discover tips, games, and the best practices for maximizing your online gambling experience.” </description> Introduction to Online Casino Betmac <description>Discover the thrilling experience of Online Casino Betmac. Enjoy a wide range of games, lucrative bonuses, and a user-friendly interface that makes your gaming experience unforgettable.” </description> <description>Discover the vibrant world of Casino Disco Win UK! Experience thrilling games, exciting bonuses, and dance to the rhythm of winning.</description> The Golden Genie Casino Registration Process BetFoxx Casino Overview <description>Discover the thrill of online gaming at Magic Win Online Casino UK. Explore exciting games, bonuses, and more in our comprehensive review.</description> Explore the Enchanting World of Candyland Casino Registering at Paradise 8 Casino: A Comprehensive Guide The Importance of Registration at God Odds Casino <description>Explore the exciting offerings of Crypto Palace Casino & Sportsbook, a premier destination for online gaming enthusiasts and sports bettors.” </description> <description>Explore the exciting world of Castle Casino & Sportsbook, offering a thrilling gaming experience with a wide array of casino games and sports betting options.</description> <description>Explore the thrilling features and offerings of Casino Luckypays, where luck meets entertainment. Join now for an unforgettable gaming experience!</description> Brighton Therapy Works Casino Registration: A Comprehensive Guide <description>Discover the exciting world of Astrozino Casino & Sportsbook. Explore an extensive range of casino games and sports betting options that will elevate your gaming experience.</description> The Fascinating World of Cobras: Nature’s Enigmatic Serpents Friends of Royal Lyver Online: A Sanctuary for Wildlife Enthusiasts <description>Discover the exciting world of Zodiacbet Casino & Sportsbook, featuring a wide range of games, betting options, and promotions. Join now for an unforgettable experience!</description> Welcome to the Golden Mister: Your Ultimate Online Casino Experience Unlocking the Secrets of Casino Big Win Box Welcome to Agent No Wager Casino! Lagunaslot Situs Terpercaya Untuk Slot Online NOVOLINE Deine Spielothek mit 1050+ Online Slots legal & sicher Free Slots Online Play FREE Novomatic slots Free Online Slots: Play Casino Slot Machine Games For Fun Home <description>Dive into the exciting world of Tropical Wins Casino & Sportsbook. Enjoy a vast selection of games, seamless sports betting, and exclusive bonuses.</description> Welcome to Casino Riobet Welcome to the Thrilling World of Landboarding Welcome to Casino Hexabet UK <description>Explore essential tips and strategies to enhance your wellness journey. Learn how to improve your physical and mental health effectively.” </description> <description>Dive into the exciting world of Magic Win Casino & Sportsbook, where you can enjoy a variety of games and thrilling sports betting.</description> <description>Explore the thrilling world of FatPirate Casino Online Slots, featuring exciting games, big wins, and unique themes that will transport you to a high-seas adventure.</description> <description>Explore the thrilling world of Cherry Gold Casino & Sportsbook, where unmatched gaming experiences and exciting sports betting await players. Dive into our comprehensive guide to discover why Cherry Gold should be your go-to gaming destination.</description> Welcome to The Grand Idea Online Casino <description>Explore Pyramid Spins Casino & Sportsbook, where thrilling games and exciting sports betting come together. Enjoy seamless gaming experience today!</description> <description>Discover Mad Casino & Sportsbook, your premier destination for online gambling and sports betting. Experience a thrilling gaming adventure today!</description> <description>Discover the excitement of Neonix Casino, where thrilling games and massive bonuses await. Join now and experience the best in online gambling.</description> <description>Delve into the enchanting world of Casino Kingdom, where games, rewards, and adventures await you in a majestic royal setting.</description> The Graeme Hunter Casino Registration Process: A Comprehensive Guide <description>Explore the thrills of Efbet Online Casino UK with its extensive gaming options, bonuses, and user-friendly platform.</description> <description>Explore the excitement of CasinoXO Casino & Sportsbook. Enjoy a wide range of games, sports betting, and fantastic promotions on a secure platform.</description> <description>Discover how White Cloud Web Design can elevate your business with stunning web design, branding, and comprehensive digital solutions.</description> <description>Dive into the exciting world of Mr West Casino, where thrilling games, incredible bonuses, and top-notch service await you. Discover your next favorite game today!</description> <description>Discover the exciting world of online gaming at Playoro Casino. Enjoy a vast selection of games, enticing bonuses, and a secure gaming environment.</description> Sky Hills Casino Online Slots: Your Gateway to Exciting Gaming Adventures Welcome to Casino Lucky Boys