Tribe__Tickets_Plus__Commerce__EDD__Promoter_Observer::payment_updated( $payment_id )

If an EDD payment is updated notify to orders that are part of this payment.


Parameters #

$payment_id

(Required) int ID of the payment.


Top ↑

Source #

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

	public function payment_updated( $payment_id ) {
		// Make sure `edd_get_payment_meta_cart_details` exists
		if ( ! function_exists( 'edd_get_payment_meta_cart_details' ) ) {
			return;
		}

		$cart_details = edd_get_payment_meta_cart_details( $payment_id, true );
		$cart_details = is_array( $cart_details ) ? $cart_details : [];

		foreach ( $cart_details as $detail ) {
			if ( is_array( $detail ) && ! empty( $detail['id'] ) ) {
				$this->observer->notify_ticket_event( $detail['id'] );
			}
		}
	}

Top ↑

Changelog #

Changelog
Version Description
TBD Introduced.