Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter marc33

    (@marc33)

    All is fine as expected for this nice plugin !!!

    Hello Cenay (@cenay)

    I have the same pb with a plugin, if a plugin try to call a specific function of woocommerce like this :

    WC_Admin_Settings::output_fields( $settings )

    and if $settings have an array with array (and not an array of string) we have the error you have specified.

    I have a hack for this but it’s directly to the file : woocommerce/includes/admin/class-wc-admin-settings.php and at the line of the function
    public static function get_option( $option_name, $default = ” ) {… you will find above this line :

    if ( is_array( $option_value ) ) {
    //$option_value = array_map( ‘stripslashes’, $option_value );
    $option_value = json_decode(stripslashes(json_encode($option_value)), true); //Modif Marc
    } elseif ( ! is_null( $option_value ) ) {
    $option_value = stripslashes( $option_value );
    }

    And we don’t have the bug with this modif, but it’s not very cool to change this function.

    Have a good day

    Marc

Viewing 2 replies - 1 through 2 (of 2 total)