Change __wakeup() to a public method to avoid PHP8 warning.

This commit is contained in:
Dion Hulse 2020-09-18 07:55:26 +00:00
parent 29b8b0d60d
commit 9440ec3570
1 changed files with 4 additions and 1 deletions

View File

@ -45,5 +45,8 @@ trait SingletonTrait {
/**
* Prevent unserializing.
*/
private function __wakeup() {}
final public function __wakeup() {
wc_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'woocommerce' ), '4.6' );
die();
}
}