PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmSalesApi.php +28 -1 6.32.1 → trunk View file →
@@ -28,14 +28,41 @@
28 28 * @var array|false|null
29 29 */
30 30 private static $best_sale;
31 31
32 + /**
33 + * Flag to prevent the $this->set_sales() call in the constructor.
34 + *
35 + * @since 6.34
36 + *
37 + * @var bool
38 + */
39 + private static $prevent_new_sales_request = false;
40 +
32 41 public function __construct() {
33 42 $this->set_cache_key();
34 43
35 - if ( false === self::$sales ) {
44 + if ( ! self::$prevent_new_sales_request && false === self::$sales ) {
36 45 $this->set_sales();
37 46 }
47 + }
48 +
49 + /**
50 + * @since 6.34
51 + *
52 + * @return void
53 + */
54 + public static function prevent_new_sales_requests() {
55 + self::$prevent_new_sales_request = true;
56 + }
57 +
58 + /**
59 + * @since 6.34
60 + *
61 + * @return void
62 + */
63 + public static function allow_new_sales_requests() {
64 + self::$prevent_new_sales_request = false;
38 65 }
39 66
40 67 /**
41 68 * @since 6.17