PHPCS fixes

This commit is contained in:
Gerhard 2019-12-03 16:22:13 +02:00
parent 1f678767a9
commit da33f216ea
1 changed files with 4 additions and 4 deletions

View File

@ -113,7 +113,7 @@ class WC_Order extends WC_Abstract_Order {
$this->set_transaction_id( $transaction_id );
}
if ( ! $this->get_date_paid( 'edit' ) ) {
$this->set_date_paid( current_time( 'timestamp', true ) );
$this->set_date_paid( time() );
}
$this->set_status( apply_filters( 'woocommerce_payment_complete_order_status', $this->needs_processing() ? 'processing' : 'completed', $this->get_id(), $this ) );
$this->save();
@ -292,11 +292,11 @@ class WC_Order extends WC_Abstract_Order {
if ( $this->has_status( $payment_completed_status ) ) {
// If payment complete status is reached, set paid now.
$this->set_date_paid( current_time( 'timestamp', true ) );
$this->set_date_paid( time() );
} elseif ( 'processing' === $payment_completed_status && $this->has_status( 'completed' ) ) {
// If payment complete status was processing, but we've passed that and still have no date, set it now.
$this->set_date_paid( current_time( 'timestamp', true ) );
$this->set_date_paid( time() );
}
}
}
@ -310,7 +310,7 @@ class WC_Order extends WC_Abstract_Order {
*/
protected function maybe_set_date_completed() {
if ( $this->has_status( 'completed' ) ) {
$this->set_date_completed( current_time( 'timestamp', true ) );
$this->set_date_completed( time() );
}
}