Tribe__Tickets__Commerce__PayPal__Gateway::set_invoice_number()
Sets an invoice number (generating it if one doesn’t exist) in the cookies.
Return
(string) The invoice alpha-numeric identifier
Source
File: src/Tribe/Commerce/PayPal/Gateway.php
public function set_invoice_number() {
$invoice = $this->get_invoice_number();
// set the cookie (if it was already set, it'll extend the lifetime)
$secure = 'https' === parse_url( home_url(), PHP_URL_SCHEME );
setcookie( self::$invoice_cookie_name, $invoice, time() + $this->invoice_expiration_time, COOKIEPATH, COOKIE_DOMAIN, $secure );
set_transient( $this->invoice_transient_name( $invoice ), '1', $this->invoice_expiration_time );
return $invoice;
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |