Jump to content

PHP Deprecated


m.fontana

Recommended Posts

Hello to all,
I am having a problem with my PHP and Prestashop version.

PHP: 7.3
Prestashop: 1.7.7.7

I installed this extension https://classydevs.com/prestashop-page-builder/ and in the product page I am experiencing these errors

Deprecated: Non-static method PaymentOptionsFinder::getInstalledPaymentModules() should not be called statically in /var/www/vhosts/apiceweb.it/subdomains/lavori/httpdocs/prestashop/modules/restrictpaymentmethods/restrictpaymentmethods.php on line 242

Deprecated: Non-static method PaymentOptionsFinder::filterAllPaymentMethods() should not be called statically in /var/www/vhosts/apiceweb.it/subdomains/lavori/httpdocs/prestashop/override/classes/checkout/PaymentOptionsFinder.php on line 70

If I disable the extension the error disappears. The problem is that I need the extension and the support tells me that the problem is not theirs.

Do you know how I can solve the problem?

A thousand thanks
Matteo

Link to comment
Share on other sites

It'll be difficult as you probably are not a developer.
Basically there are two approaches, replacing those calls with
1. Either initializing the class having those methods like $x = new Class_with_methods then calling each method $x->a_method, or
2. Copy the content of those methods into new local methods and calling them directly but if they have dependencies you'll have to implement them too.
Maybe the better way would be to contact that extension developers and ask for help or if it is a free one submit your question on their forum.

Link to comment
Share on other sites

On 9/16/2021 at 3:51 PM, m.fontana said:

The problem is that I need the extension and the support tells me that the problem is not theirs.

Thats a strange statement as the message is clearly coming from the module. So they should make this compatible with latest PHP versions as this will cause hard errors in further PHP version

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...