Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solving problem Creation of dynamic property WC_States_Places::$plugin_path is deprecated in php 8.2 #247

Open
thienphuc2611 opened this issue Aug 18, 2023 · 2 comments

Comments

@thienphuc2611
Copy link

Creation of dynamic property WC_States_Places::$plugin_path is deprecated at "wp-content/plugins/states-cities-and-places-for-woocommerce/states-cities-and-places-for-woocommerce.php:304"

Replace:

`private function get_plugin_path() {
if (isset($this->plugin_path)) {
return $this->plugin_path;
}
$path = $this->plugin_path = plugin_dir_path( FILE );

return untrailingslashit($path);
}`

To

`private static $plugin_path;

private function get_plugin_path() {
if (self::$plugin_path) {
return self::$plugin_path;
}

self::$plugin_path = plugin_dir_path( FILE );

return untrailingslashit(self::$plugin_path);
}`

Done.

@YordanSoares
Copy link
Collaborator

Hi @thienphuc2611,

Could you please open a new PR with this change?

@thienphuc2611
Copy link
Author

Hi @thienphuc2611,

Could you please open a new PR with this change?

Sorry. I don't know how to creat Pull Request sir =]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants