• I am using Woocommerce to sell learndash courses! After an order is being ‘completed’ (not ‘pending’ or ‘on hold’ or in other status), my site is showing warnings in the top of the website.

    Warning: Illegal string offset ‘post-type’ in /wp-includes/class-wp-list-util.php on line 157

    The warning is being shown only to the user who purchased the product. Here are some screenshots: https://imgur.com/a/Y2FWf

    And this is the code where the warning is coming from:

    public function pluck( $field, $index_key = null ) {
        if ( ! $index_key ) {
            /*
             * This is simple. Could at some point wrap array_column()
             * if we knew we had an array of arrays.
             */
            foreach ( $this->output as $key => $value ) {
                if ( is_object( $value ) ) {
                    $this->output[ $key ] = $value->$field;
                } else {
                    $this->output[ $key ] = $value[ $field ];      /**** line 157 ****/
                }
            }
            return $this->output;
        }

    screenshot: https://imgur.com/Yxo9NpR

    Note: This is the very first time I tested placing an order and the warning showed. So totally no idea which activity of mine causing this issue.

    Thank you ??

Viewing 1 replies (of 1 total)
  • Thread Starter Yanur Islam Piash

    (@yipiash)

    This was because of a conflict between woocommerce and BadgeOS Community Add-on. I deactivated BadgeOS Community Add-on and my website looks fine.

Viewing 1 replies (of 1 total)
  • The topic ‘Warning: Illegal string offset ‘post-type’.. showing after order being completed’ is closed to new replies.