Articles on: FAQs

Why am I receiving an error code while processing a refund for my WooCommerce customer?

Error: Unable to refund for WooCommerce merchant



Reason: If you are processing WooCommerce refund in AfterShip Returns and have Cloudflare configured as your cloud gateway, Cloudflare may block the API refund requests. This may happen because of Cloudflare's Web Application Firewall (WAF) settings which is perceiving your WooCommerce return requests from AfterShip Returns as a threat and consequently blocking them.

Solution: Modify the Web Application Firewall (WAF) rules to whitelist API requests by AfterShip Returns to ensure valid refund request parameters are recognized and not flagged as threats.

Follow the steps to create a Web Application Firewall (WAF) rule in your Cloudflare account:

Log in to your Cloudflare account.
Navigate to Security > WAF.
Follow these sub-steps to create the rule:

a. Rule name: Bypass wordpress API calls
b. When incoming requests match...

Field: URI Full
Operator: Contains
Value: wp-json

c. Action: Skip
d. Log matching requests: Enable
e. WAF components to skip: Enable the following parameters

All remaining custom rules
All rate limiting rules
All managed rules
All Super Bot Fight Mode Rules
Zone Lockdown
User Agent Blocking
Browser Integrity Check
Hotlink Protection
Security Level
Rate limiting rules (previous version)
Managed rules (previous version)

Deploy the rule.


Updated on: 25/07/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!