• Resolved isabelk2j

    (@isabelk2j)


    This is more of a support to bring your attention to an issue I just faced, which was pointed out by one of my buyer. Their customer was unable to place order on wooCommerce. So I debugged the error and it was coming from the plugin. I traced further and I found the error. Below is the error

    [16-Nov-2020 20:08:02 UTC] PHP Fatal error:  Uncaught Error: Object of class stdClass could not be converted to string in .../wp-content/plugins/wp-hide-security-enhancer/include/functions.class.php:1529
    Stack trace:
    #0 .../wp-content/plugins/wp-hide-security-enhancer/include/functions.class.php(1529): str_ireplace('......', '%WPH-PLACEHOLDE...', Object(stdClass))
    #1 .../wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php(1516): WPH_functions->content_urls_replacement(Object(stdClass), Array)
    #2 .../wp-includes/class-wp-hook.php(287): WPH->update_post_metadata(NULL, 6106, 'lws_woorewards_...', Object(stdClass), '')
    #3 .../wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array)
    #4 .../wp-includes/meta.php(205): apply_filters('update_post_met...', NULL, 6106, 'lws_woorewards_...', Object(st in 

    I think WooRewards plugin return object somewhere in their code and Wp-Hide doesn’t handle object when content_urls_replacement() so just by adding the below code fixed the issue for me

    elseif( is_object($meta_value) ) {
         $meta_value         =   (array)$meta_value;
         if ( count ( $meta_value ) > 0 )
         {
              foreach ( $meta_value   as  $key  => $value )
              {
                  $meta_value[$key]         =   $this->functions->content_urls_replacement( $value,  $replacement_list );
              }
         }
    }

    in the …/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php(1516) file. So please help look into this, so that update made to the plugin doesn’t override this code and this will help others as well.

    AGAIN
    PHP 7.4 gives this notice (PHP Notice: Trying to access array offset on value of type bool in …/wp-content/plugins/wp-hide-security-enhancer/include/admin-interface.class.php on line 284), I will temporarily fix on my end, please help look into this as well. Thanks so much for this wonderful plugin.

    • This topic was modified 4 years, 4 months ago by isabelk2j.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Maya

    (@tdgu)

    Hi,
    Thanks for your feedback. We issued a code update for that area, please check if the latest works for you.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin Causing error during Woocommerce checkout’ is closed to new replies.