Errors When Posting Reviews to WordPress
After a customer submits an aggregated review form (What is an Aggregated Review Form?), the form attempts to post reviews to WooCommerce. If transmission of reviews to WooCommerce fails, the store owner will receive an automatic notification to the email address specified in Email for Notifications field on Review Reminder tab of the plugin’s settings. The notification will include all available information about the error.
Here we provide troubleshooting tips for common errors and potential solutions.
Errors 401, 403
If you received error codes 401 or 403, it means that something blocks REST API in WordPress on your site. It could be a security plugin, a password-protection plugin or a custom code snippet in functions.php that disables REST API.
Please check plugins installed on your WordPress site that might potentially restrict REST API. If there is any plugin blocking REST API, you should update its configuration to allow inbound REST API calls that transmit customer reviews from the aggregated review forms to your site. Depending on the security plugin you use, there are different ways to do it. For example:
- Completely disable blocking of REST API. It is usually the easiest solution but it will open not just REST API endpoints for our plugin but also the standard WordPress REST API endpoints and endpoints of other plugins you might have installed on your site.
- Add the IP address of review forms to a whitelist in the settings of the security plugin. If the security plugin offers an option to add specific IP addresses to the whitelist, try adding the following IP address: 18.210.171.51. It is the IP address of review forms that sends customer reviews to your store.
- Disable blocking of REST API for the endpoint of our plugin only. If the security plugin offers an option to block and unblock specific REST API endpoints, try unblocking the following endpoint: /ivole/. It is the endpoint of our plugin that is used to receive customer reviews.
- Whitelist URL of the REST API endpoint. The URL will depend on the domain of your website and will look like this: {website domain}/wp-json/ivole/*
If you don’t have any security plugins installed on your site, please also check the custom code that you might have in your theme’s functions.php file. Any code that blocks REST API should be adjusted to allow either the IP address of review forms (see above) or REST API endpoint used by our plugin (also see above).
Examples of Security Plugins
Here are some examples of security plugins that can block REST API and block transmission of reviews. This list is by no means complete because new plugins are published every week.
- Blackhole for Bad Bots, additional information: https://wordpress.org/support/topic/error-posting-data-to-the-shop-3/
- Cerber Security
- Wordfence Security
- JWT Auth, additional information: https://wordpress.org/support/topic/problem-saving-the-feedback-form/
- Various plugins that completely lock a public website frontend behind a password
Error 500
After a customer submits their reviews via an aggregated review form, the form tries to transmit the reviews to your WooCommerce store. If there is an error during the transmission, the form will send a notification with information about the error to the email address that you specified in the settings of the plugin (‘Review Reminder’ tab, ‘Email for Notifications’ field).
One of the errors that might occur during the transmission is ‘Error: Request failed with status code 500’. Here are the steps for troubleshooting this problem.
1. Temporarily enable debugging in WordPress. Here is an article that explains how to do it: https://wordpress.org/support/article/debugging-in-wordpress/. In brief, below are the settings that need to be added to your wp-config.php file. Before making any changes to the wp-config.php file, please make sure to create a backup copy of this file.PHP
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
PHP
2. After debugging is enabled, it is necessary to reproduce the error. To do this, create a small order in WooCommerce (for yourself) and send yourself an invitation to review the order (How to Manually Send Review Reminders). Leave a test review and submit the form.
3. Go to WooCommerce and confirm that the review you have just submitted is not there.
4. Download and review the debug log (you will need to locate it on your website server using FTP access) to see if there are any errors.
5. Contact us (create a ticket on this support portal) and let us know what errors you found in the debug log.
6. Disable debugging in WordPress.
Error 503 (Cloudflare)
If you’re using Cloudflare, there’s a possibility that they are blocking the review forms from sending any data to your website. Please add the IP address 18.210.171.51 to your Cloudflare Allowlist using their IP Access Rule.
To create an IP Access Rule, follow these steps:
- Log in to your Cloudflare account.
- Select your domain.
- Click the Firewall app.
- Click on the Tools tab.
- Under IP Access Rules, enter the following details:
- Enter the IP 18.210.171.51 ) under the “Value” field
- Select “Allow” as your Action.
- Select whether the rule applies to This website or All websites in the account.
- (Optional) add a Note (i.e. Customer Reviews).
- Click Add.
How to re-post reviews that could not be transmitted?
If you fixed the problem with transmission of reviews to WooCommerce, it is possible to re-send the reviews that failed. To do this, go to your account at cusrev.com and navigate to Reviews page. There, you will see a list of reviews. If a review could not be successfully posted to WooCommerce from the first time, you will be able to re-send it using WooCommerce button as shown on the screenshot below.