Skip to content

Commit 280fabc

Browse files
committed
[php-error] Remove the dynamic property creation php error. This is happening because we use PHP serialization to store classes in DB.
1 parent a91a95b commit 280fabc

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

includes/entities/class-fs-plugin-plan.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ class FS_Plugin_Plan extends FS_Entity {
7575
* @var string Support phone.
7676
*/
7777
public $support_phone;
78+
/**
79+
* @var string Support skype username.
80+
*
81+
* @deprecated
82+
*/
83+
public $support_skype = '';
7884
/**
7985
* @var bool Is personal success manager supported with the plan.
8086
*/
@@ -109,6 +115,18 @@ function __construct( $plan = false ) {
109115
}
110116
}
111117

118+
/**
119+
* This removes the deprecated 'support_skype' property from the serialized data.
120+
* Should clean up the serialized data to avoid PHP 8.2 warning on next execution.
121+
*
122+
* @return void
123+
*/
124+
function __wakeup() {
125+
if ( property_exists( $this, 'support_skype' ) ) {
126+
unset( $this->support_skype );
127+
}
128+
}
129+
112130
static function get_type() {
113131
return 'plan';
114132
}

start.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @var string
1717
*/
18-
$this_sdk_version = '2.12.1.3';
18+
$this_sdk_version = '2.12.1.4';
1919

2020
#region SDK Selection Logic --------------------------------------------------------------------
2121

0 commit comments

Comments
 (0)