Fatal error on Divi template builder
-
Hi there,
Your plugin is causing an issue on Divi 4.24.3 and possibily other versions, under PHP 8.2+
The error is the following:
[09-Apr-2024 12:08:21 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_meta() on bool in <ABSPATH>/wp-content/plugins/elex-product-price-custom-text-before-after-text-and-discount-for-woocommerce/includes/SettingsController.php:433
It also impacts line 435.
I’ve replaced the lines with the following:
433: $custom_check_enable = $product_info ? $product_info->get_meta( 'elex_ppct_custom_fields_checkbox' ) : 'no';
435: $custom_discount_checkbox = $product_info ? $product_info->get_meta( 'elex_ppct_custom_fields_discount_type_checkbox' ) : 'no';
I am not sure why you are trying to fetch the product once again in line 432, since normally you should already have the product passed in the second function parameter.
Either way, if you could get a chance to investigate this and fix in in next releases, it would be great.
Best regards,
Adrian
- The topic ‘Fatal error on Divi template builder’ is closed to new replies.