• Resolved joekewe

    (@joekewe)


    I have been getting PHP Fatal Errors for the last month (or earlier) when uploading products to WooCommerce using the REST API if Booster Plus’s Price by Country module is enabled. I have been using Price by Country with four groups of countries since 2017. The error disappears when I disable that module.

    The PHP Error.log shows “PHP Fatal error: Uncaught Error: Call to a member function generate_cart_id() on null in /www/autom8_679/public/wp-content/plugins/booster-plus-for-woocommerce/includes/price-by-country/class-wcj-price-by-country-core.php:820”.

    I have tried my normal JSON field, and also simplified it to the absolute minimum, and the error is still happening:
    { “id”:”24602″, “name”:”Microspheres”,”regular_price”:”330″,”sale_price”:””,”date_on_sale_from”:””,”date_on_sale_to”:”” }
    or
    { “id”:”6419″, “name”:”Reservoir”,”description”:”Two replacement beakers”,”date_on_sale_from”:””,”date_on_sale_to”:”” }

    I have tried enabling and disabling the following options in Price by Country settings without any success:
    Disable Quick Edit Product For Admin Scope
    Price Filter Widget and Sorting by Price Support
    Select your preferred method for fetching the price
    Save Calculated Products Prices
    Save Country Group ID

    “Reset Settings for your module to clear all country groups at once” – fixed the problem, even after I reenabled the module, but stops working as soon as I define even a single country in Groups.

    JSON URL: https://www.autom8.com/wp-json/wc/v2/products/24604?consumer_key=xxx&consumer_secret=xxx Parameters: { }, username, password
    WordPress version: 6.1.1
    WooCommerce version: 7.1.0
    WooCommerce REST API package: 7.1.0
    PHP: 8.0.21
    Booster Plus: 6.0.0

    Thank you for your help,

    joekewe

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Fatal Errors with WooCommerce REST API when Price by Country is enabled’ is closed to new replies.