Robert Moore
Robert Moore
`#0 /home/public_html/manage/lib/woocommerce-api/class-wc-api-client.php(286): WC_API_Client_HTTP_Request->dispatch() #1 /home/public_html/manage/lib/woocommerce-api/resources/abstract-wc-api-client-resource.php(122): WC_API_Client->make_api_call('GET', 'products/sku/1....', Array) #2 /home/public_html/manage/lib/woocommerce-api/resources/class-wc-api-client-resource-products.php(65): WC_API_Client_Resource->do_request() #3 /home/public_html/manage/addProducts.php(69): WC_API_Client_Resource_Products->get_by_sku(1E+28) #4 {main} thrown in /home/public_html/manage/lib/woocommerce-api/class-wc-api-client-http-request.php on line 210 `
I can't eval it.. that still throws end execution. `$result = eval($currentProductReviewing = $client->products->get_by_sku( 9999999999999999999999999999 ));`
I guess i just need an example of how to make an error non fatal so i can do what needs done .
`catch ( WC_API_Client_Exception $e ) { ``` return $e->getMessage() . PHP_EOL; return $e->getCode() . PHP_EOL; if ( $e instanceof WC_API_Client_HTTP_Exception ) { return ( $e->get_request() ); return ( $e->get_response() );...
Anybody?