• Resolved contactovisualpt

    (@contactovisualpt)


    Good morning

    “PHP Warning: Illegal offset type in isset or empty in /home/******/public_html/wp-content/plugins/facebook-for-woocommerce/includes/fbwpml.php on line 56”

    I’m seeing this alert every day on the error_log of my client’s site. I can’t find on where or how to fix it.

    Can anyone help?

    Nelson / Contacto Visual

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

    (@amandasjackson)

    Hi there,

    Looking into the code where that warning is coming from I found the following

    			// Hide products from non-active languages.
    			if ( ! isset( $settings[ $product_lang ] ) ) {
    				return true;
    			}
    			return $settings[ $product_lang ] !== FB_WPML_Language_Status::VISIBLE;
    		}
    
    		public function wpml_ajax_support( $call, $REQUEST ) {
    			global $sitepress;
    			if ( isset( $REQUEST['icl_ajx_action'] ) ) {
    				$call = $REQUEST['icl_ajx_action'];
    			}
    			if ( $call === 'icl_fb_woo' ) {
    				$active_languages = array_keys( $sitepress->get_active_languages() );
    				$settings         = array();
    				foreach ( $active_languages as $lang ) {
    					$settings[ $lang ] = $REQUEST[ $lang ] === 'on' ?
    					FB_WPML_Language_Status::VISIBLE : FB_WPML_Language_Status::HIDDEN;
    				}
    
    				update_option( 'fb_wmpl_language_visibility', $settings, false );
    				self::$settings = $settings;
    			}
    		}
    • This reply was modified 3 years, 7 months ago by AJ a11n.
    Thread Starter contactovisualpt

    (@contactovisualpt)

    So… that’s a WPML conflict? Products not translated or without a default language?

    Is the solution in the WPML, the product configuration, or should I change something in the plugin code?

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @contactovisualpt

    The code causing the conflict is beyond what we can help with. However, you can contact the folks at WPML and they will be able to take a closer look.

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hello @contactovisualpt

    We’ll mark this thread as resolved since we have not heard back from you in a week. Should you still have issues, first confirm that Facebook for WooCommerce is fully updated. You can buy the free plugin from that page for updates and support WooCommerce.com. Please open a new support thread on this forum if you still have trouble or any questions.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Warning: Illegal offset type in isset or empty’ is closed to new replies.