plugin updates
This commit is contained in:
@@ -533,7 +533,10 @@ class WC_Webhook extends WC_Legacy_Webhook {
|
||||
// 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();
|
||||
|
||||
if ( 0 !== $this->get_id() ) {
|
||||
$this->save();
|
||||
}
|
||||
} else {
|
||||
$this->failed_delivery();
|
||||
}
|
||||
@@ -557,7 +560,9 @@ class WC_Webhook extends WC_Legacy_Webhook {
|
||||
$this->set_failure_count( ++$failures );
|
||||
}
|
||||
|
||||
$this->save();
|
||||
if ( 0 !== $this->get_id() ) {
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user