Tribe__Tickets__Commerce__PayPal__Main::get_order_data( string $order_id )
Retrieve only order related information Important: On PayPal Ticket the order is the Attendee Object
Contents
order_id purchaser_name purchaser_email provider provider_slug
Parameters
- $order_id
-
(string) (Required)
Return
(array)
Source
File: src/Tribe/Commerce/PayPal/Main.php
public function get_order_data( $order_id ) {
$name = get_post_meta( $order_id, $this->full_name, true );
$email = get_post_meta( $order_id, $this->email, true );
$data = array(
'order_id' => $order_id,
'purchaser_name' => $name,
'purchaser_email' => $email,
'provider' => __CLASS__,
'provider_slug' => 'tpp',
'purchase_time' => get_post_time( Tribe__Date_Utils::DBDATETIMEFORMAT, false, $order_id ),
);
/**
* Allow users to filter the Order Data
*
* @since 4.7
*
* @param array $data An associative array with the Information of the Order
* @param string $provider What Provider is been used
* @param int $order_id Order ID
*
*/
$data = apply_filters( 'tribe_tickets_order_data', $data, 'tpp', $order_id );
return $data;
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |