/** * @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 ); } } Commenti a: ทำความรู้จักกับโลกของมังงะญี่ปุ่น https://www.wealthproject.it/%e0%b8%97%e0%b8%b3%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b8%a3%e0%b8%b9%e0%b9%89%e0%b8%88%e0%b8%b1%e0%b8%81%e0%b8%81%e0%b8%b1%e0%b8%9a%e0%b9%82%e0%b8%a5%e0%b8%81%e0%b8%82%e0%b8%ad%e0%b8%87%e0%b8%a1/?utm_source=rss&utm_medium=rss&utm_campaign=%25e0%25b8%2597%25e0%25b8%25b3%25e0%25b8%2584%25e0%25b8%25a7%25e0%25b8%25b2%25e0%25b8%25a1%25e0%25b8%25a3%25e0%25b8%25b9%25e0%25b9%2589%25e0%25b8%2588%25e0%25b8%25b1%25e0%25b8%2581%25e0%25b8%2581%25e0%25b8%25b1%25e0%25b8%259a%25e0%25b9%2582%25e0%25b8%25a5%25e0%25b8%2581%25e0%25b8%2582%25e0%25b8%25ad%25e0%25b8%2587%25e0%25b8%25a1 Consulenza Finanziaria e Assicurativa Mon, 30 Nov 2026 14:45:34 +0000 hourly 1 https://wordpress.org/?v=6.0.2