• PHP Notice: Array to string conversion in /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/class-woofunnels-db-operations.php on line 295

    I think you need to unsset( $meta_value ) the array before using the same variable to hold a string.

    if ( false === is_array( $meta_value ) ) {
    	$meta_value = [];
    }
    $meta_value = wp_json_encode( array_unique( array_merge( $meta_value_ids, $meta_value ) ) );
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Brian Henry

    (@brianhenryie)

    Another one:

    PHP Notice: Undefined property: stdClass::$city in /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/class-woofunnels-contact.php on line 559

    Thread Starter Brian Henry

    (@brianhenryie)

    PHP Notice: Undefined property: stdClass::$state in /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/class-woofunnels-contact.php on line 569

    Thread Starter Brian Henry

    (@brianhenryie)

    Deprecated function WC_Abstract_Legacy_Order::get_product_from_item in woofunnels-customer-functions.php:104

    
    #0 /path/to/wp-includes/class-wp-hook.php(287): BH\includes\Functions->log_deprecated_functions_only_once_per_day('WC_Abstract_Leg...', '$item->get_prod...', '4.4.0')
    #1 /path/to/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #2 /path/to/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /path/to/wp-includes/functions.php(4839): do_action('deprecated_func...', 'WC_Abstract_Leg...', '$item->get_prod...', '4.4.0')
    #4 /path/to/wp-content/plugins/woocommerce/includes/wc-deprecated-functions.php(54): _deprecated_function('WC_Abstract_Leg...', '4.4.0', '$item->get_prod...')
    #5 /path/to/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-order.php(320): wc_deprecated_function('WC_Abstract_Leg...', '4.4.0', '$item->get_prod...')
    #6 /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/woofunnels-customer-functions.php(104): WC_Abstract_Legacy_Order->get_product_from_item(Object(WC_Order_Item_Product))
    #7 /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/woofunnels-contact-functions.php(147): bwf_create_update_customer(Object(WooFunnels_Contact), Object(Automattic\WooCommerce\Admin\Overrides\Order), '60812', Array, 0)
    #8 /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/class-woofunnels-db-updater.php(111): bwf_create_update_contact('60812', Array, 0, false)
    #9 /path/to/wp-includes/rest-api/class-wp-rest-server.php(1160): WooFunnels_DB_Updater::capture_order_status_change_event(Object(WP_REST_Request))
    #10 /path/to/wp-includes/rest-api/class-wp-rest-server.php(1007): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/woofunnel_cust...', Array, NULL)
    #11 /path/to/wp-includes/rest-api/class-wp-rest-server.php(440): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #12 /path/to/wp-includes/rest-api.php(354): WP_REST_Server->serve_request('/woofunnel_cust...')
    #13 /path/to/wp-includes/class-wp-hook.php(287): rest_api_loaded(Object(WP))
    #14 /path/to/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #15 /path/to/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #16 /path/to/wp-includes/class-wp.php(388): do_action_ref_array('parse_request', Array)
    #17 /path/to/wp-includes/class-wp.php(745): WP->parse_request('')
    #18 /path/to/wp-includes/functions.php(1291): WP->main('')
    #19 /path/to/wp-blog-header.php(16): wp()
    #20 /path/to/index.php(17): require('/home/customer/...')
    #21 {main}
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Notice: Array to string conversion’ is closed to new replies.