Home / Admin / The commission is only log when the order status is completed
Duplicate Snippet

Embed Snippet on Your Site

The commission is only log when the order status is completed

log commission when the order status is completed.

Code Preview
php
<?php
if ( ! function_exists( 'wcv_log_commission_order_status' ) ) {
	/**
	 * Log commission when order status is ?
	 *
	 * @param array $order_statuses The order statuses.
	 * @return array
	 */
	function wcv_log_commission_order_status( $order_statuses ) {
		$key = array_search( 'processing', $order_statuses, true );
		if ( false !== $key ) {
			unset( $order_statuses[ $key ] );
		}
		return $order_statuses;
	}
	add_filter( 'wcvendors_completed_statuses', 'wcv_log_commission_order_status' );
}

Comments

Add a Comment