Tribe__Tickets_Plus__Commerce__EDD__Promoter_Observer::customer_updated( $updated,  $customer_id )

Callback if an EDD customer has been updated.


Parameters #

$updated

(Required) bool If the updated was successful or not.

$customer_id

(Required) int Customer ID updated with the Order.


Top ↑

Source #

File: src/Tribe/Commerce/EDD/Promoter_Observer.php

	public function customer_updated( $updated, $customer_id ) {
		if ( ! $updated || ! class_exists( 'EDD_Customer' ) ) {
			return;
		}

		$customer = new EDD_Customer( $customer_id );
		$payments = [];

		if ( method_exists( $customer, 'get_payment_ids' ) ) {
			$payments = $customer->get_payment_ids();
		}

		$payments = is_array( $payments ) ? $payments : [];
		foreach ( $payments as $payment_id ) {
			$this->payment_updated( $payment_id );
		}
	}

Top ↑

Changelog #

Changelog
Version Description
TBD Introduced.