WC_Gateway_COD::change_payment_complete_order_status( string $status, int $order_id, WC_Order|false $order = false )

Change payment complete order status to completed for COD orders.


Description Description


Parameters Parameters

$status

(Required) Current order status.

$order_id

(Required) Order ID.

$order

(Optional) Order object.

Default value: false


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/gateways/cod/class-wc-gateway-cod.php

	public function change_payment_complete_order_status( $status, $order_id = 0, $order = false ) {
		if ( $order && 'cod' === $order->get_payment_method() ) {
			$status = 'completed';
		}
		return $status;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.