WooCommerce::earning_data_status_change( $order_id,  $status_from,  $status_to )

Change earning status of related to WooCommerce order


Parameters

$order_id

(Required)

$status_from

(Required)

$status_to

(Required)


Source

File: classes/WooCommerce.php

	public function earning_data_status_change( $order_id, $status_from, $status_to ) {
		global $wpdb;

		$earning_data = (int) $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->dozent_earnings} WHERE order_id = {$order_id};" );

		if ( $earning_data ) {
			$wpdb->update( $wpdb->dozent_earnings , [ 'order_status' => $status_to ], [ 'order_id' => $order_id ] );
		}
	}

Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.