Use active voice

This commit is contained in:
Claudiu Lodromanean 2017-03-10 10:32:27 -08:00
parent d630b948e3
commit 73ed273189
1 changed files with 2 additions and 2 deletions

View File

@ -711,7 +711,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
if ( $this->get_id() && $this->data_store ) {
$new_count = $this->data_store->increase_usage_count( $this, $used_by );
// Bypass set_prop and remove pending changes since the count gets written by the data store.
// Bypass set_prop and remove pending changes since the data store saves the count already.
$this->data['usage_count'] = $new_count;
if ( isset( $this->changes['usage_count'] ) ) {
unset( $this->changes['usage_count'] );
@ -728,7 +728,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
if ( $this->get_id() && $this->get_usage_count() > 0 && $this->data_store ) {
$new_count = $this->data_store->decrease_usage_count( $this, $used_by );
// Bypass set_prop and remove pending changes since the count gets written by the data store.
// Bypass set_prop and remove pending changes since the data store saves the count already.
$this->data['usage_count'] = $new_count;
if ( isset( $this->changes['usage_count'] ) ) {
unset( $this->changes['usage_count'] );