• Resolved Demonipo

    (@demonipo)


    The Cart and Checkout pages stopped working due to a PHP error. I have checked the code and I have a quick fix going but i don’t know if it could be done better.

    Error: PHP Fatal error: Uncaught Error: Cannot unset offset in a non-array variable in /flexible-checkout-fields/classes/plugin.php (lines 235 and 266)

    Code for lines 235 – 239:

    if (is_array($base[ $key ])) {
    unset( $base[ $key ]['placeholder'] );
    unset( $base[ $key ]['label'] );
    if ( version_compare( WC()->version, '4.4.1', '>=' ) ) {
    unset( $base[ $key ]['class'] );
    }
    }

    Code for line 266 – 269:

    if (is_array($locale[ $country ][ $field ])){
    unset( $locale[ $country ][ $field ]['priority'] );
    unset( $locale[ $country ][ $field ]['label'] );
    unset( $locale[ $country ][ $field ]['placeholder'] );
    }

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

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

    (@rzepsen)

    Hello @demonipo

    Thank you for your message.

    This problem may be related to other plugin used in your shop. Please try to isolate an issue, by disable plugins which are not our or WooCommerce.?Then please enable plugins one by one,?deleting cache, and check if the problem still exists.

    If yes, please test the plugin again, but now using Storefront – official WooCommerce theme. It will help us identify a possible conflict with your theme.

    Please, let me know about the result.

    Best Regards,

    Thread Starter Demonipo

    (@demonipo)

    Found out that the plugin is conflicting with portugal-states-distritos-for-woocommerce, possibly due to how they added the districts to Woocommerce. Should I also report this conflict to them?

    Plugin Support rzepsen

    (@rzepsen)

    Hello @demonipo

    Yes. If the plugin overwrites the WooCommerce mechanism, report it to support. Our plugin will work with WooCommerce, but only if it is not modified.

    Plugin Support rzepsen

    (@rzepsen)

    Hello @demonipo

    As we haven’t got any replies, I’m marking this topic as resolved for now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal PHP Error on Cart and Checkout pages’ is closed to new replies.