Merge pull request #15633 from woocommerce/fix/change_payment_complete_order_status

Set defaults to avoid error if too few args passed
This commit is contained in:
Claudiu Lodromanean 2017-06-15 14:52:22 -07:00 committed by GitHub
commit 8ed149915d
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
* @param WC_Order $order
* @return string
*/
public function change_payment_complete_order_status( $status, $order_id, $order ) {
public function change_payment_complete_order_status( $status, $order_id = 0, $order = false ) {
if ( $order && 'cod' === $order->get_payment_method() ) {
$status = 'completed';
}