Describe the bug
When wc-admin was deployed to WooCommerce.com, some REST API requests to non wc/v4 endpoints began to fatal. These endpoints powered integrations for support and as such caused workflow issues.
Uncaught Error: Call to undefined method WP_Error::get_data()
/var/www/wp-content/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-performance-indicators-controller.php
Background and possible ideas as to why this is happening:
p1558537350046400-slack-woocommerce-com
@jeffstieler what do you think about bringing over the "fix" from https://github.com/Automattic/woocommerce.com/pull/5993/files, the if ( is_wp_error( $response ) ) { returning $response. While it doesn't seem like that was the ultimate issue, it seems like it wouldn't hurt to have that as a safe path?
Most helpful comment
@jeffstieler what do you think about bringing over the "fix" from https://github.com/Automattic/woocommerce.com/pull/5993/files, the
if ( is_wp_error( $response ) ) {returning $response. While it doesn't seem like that was the ultimate issue, it seems like it wouldn't hurt to have that as a safe path?