Merge pull request #21491 from thiscouldbejd/patch-1
Avoid treating HTTP 301 and 302 Codes as Failures
This commit is contained in:
commit
282f78d59e
|
@ -442,7 +442,8 @@ class WC_Webhook extends WC_Legacy_Webhook {
|
|||
);
|
||||
|
||||
// Track failures.
|
||||
if ( intval( $response_code ) >= 200 && intval( $response_code ) < 300 ) {
|
||||
// Check for a success, which is a 2xx, 301 or 302 Response Code.
|
||||
if ( intval( $response_code ) >= 200 && intval( $response_code ) < 303 ) {
|
||||
$this->set_failure_count( 0 );
|
||||
$this->save();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue