π CoCart is a free REST API designed to decouple your slow WooCommerce storefront and convert it blazing-fast, build in any web framework, and save you countless hours.
When fetching the cart via API (logged in user), WP generates an error in the error log:
2022/01/27 12:36:51 [error] 85459#85459: *4973 FastCGI sent in stderr: "PHP message: cocart_get_cart is deprecated since version 3.0.0 with no alternative available" while reading response header from upstream, client: 192.168.100.100, server: vuecommerce.lan, request: "GET /wp-json/cocart/v2/cart HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "vuecommerce.lan", referrer: "http://sometestsite.lan/"
Prerequisites
[x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
[ ] The issue still exists against the latest master branch of CoCart on GitHub (this is not the same version as on WordPress.org!)
[x] I have attempted to find the simplest possible steps to reproduce the issue.
[ ] I have included a failing test as a pull request (Optional)
[x] I have installed the requirements to run this plugin.
Steps to reproduce the issue
Install CoCart lite + WC (latest version 6.1.1 as of right now)
Make a request to the "get cart" endpoint: /wp-json/cocart/v2/cart
Check the error log on the server
Expected/actual behaviour
The functionality actually works as intended, i experience no issues at all. The only real issue is that the error gets logged even if WP_DEBUG is set to false, which can lead to the log file growing too big in production.
Screenshots
Isolating the problem
[x] This bug happens with only WooCommerce and CoCart plugin are active.
[ ] This bug happens with a default WordPress theme active.
[ ] This bug happens with the WordPress theme Storefront active.
[x] This bug happens with the latest release of WooCommerce active.
[ ] This bug happens only when I authenticate as a customer.
[ ] This bug happens only when I authenticate as administrator.
[x] I can reproduce this bug consistently using the steps above.
Describe the bug
When fetching the cart via API (logged in user), WP generates an error in the error log: 2022/01/27 12:36:51 [error] 85459#85459: *4973 FastCGI sent in stderr: "PHP message: cocart_get_cart is deprecated since version 3.0.0 with no alternative available" while reading response header from upstream, client: 192.168.100.100, server: vuecommerce.lan, request: "GET /wp-json/cocart/v2/cart HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "vuecommerce.lan", referrer: "http://sometestsite.lan/"
Prerequisites
master
branch of CoCart on GitHub (this is not the same version as on WordPress.org!)Steps to reproduce the issue
Expected/actual behaviour
The functionality actually works as intended, i experience no issues at all. The only real issue is that the error gets logged even if WP_DEBUG is set to false, which can lead to the log file growing too big in production.
Screenshots
Isolating the problem
WordPress Environment
Additional context