• Hi!
    I have created a new website with Learnpress on it. When testing I get fatal error after clicking the Enroll button:

    PHP Fatal error: Uncaught ValueError: Unknown format specifier “&” in /…/…/…/wp-content/plugins/learnpress/inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:561

    I have removed double quotes (“”) from here:
    esc_html__( '"%s" has been added to your cart.', 'learnpress' )

    It worked. I was able to move to checkout page. However, since guest checkout was enabled, there was another error:

    PHP Fatal error: Uncaught ValueError: Unknown format specifier ” ” in /…/…/…/wp-content/plugins/learnpress/templates/checkout/guest-checkout.php:46

    It caused that the button was not there, so I couldn’t go on.
    I turned off guest checkout. Now I was able to pay with PayPal.
    Order was created, but eventhough it was paid, it was still processing, so I was not able to access the course.

    When I tried to manually change the course status, I get the third fatal error:
    PHP Fatal error: Uncaught ValueError: Unknown format specifier ” ” in /…/…/…/wp-content/plugins/learnpress/inc/admin/class-lp-admin.php:648

    I have changed PHP version from 8.0 to 7.4, and it works now.
    Is Learnpress ready for PHP 8?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support brianvu-tp

    (@briantp)

    Hi,

    Please try to change "%s" to

    "%s"

    and recheck.

    Thanks

    • This reply was modified 3 years, 5 months ago by brianvu-tp.
    • This reply was modified 3 years, 5 months ago by brianvu-tp.
    Plugin Support brianvu-tp

    (@briantp)

    Thread Starter Rok Pisk

    (@cleopaslo)

    Hi!
    Thanks for quick reply!
    Where should I change this? In all the instances that I mentioned above?
    I’m afraid that all this will gone with the next update.

    I have changed PHP version to 8.0 again, and the Admin footer add review still makes critical error. When I comment out lines 638-675 in learnpress/inc/admin/class-lp-admin.php, it works again.

    Any idea why?
    Thanks!

    Plugin Support brianvu-tp

    (@briantp)

    So sorry, please try to replace character ” to character on this link https://oinam.github.io/entities
    We will update it on the new version of the plugin so your change will not be lost.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Errors on php 8.0’ is closed to new replies.