Edd_Helpers::get_licenses( int $order_id )
Get the licenses of the order.
Contents
Parameters Parameters
- $order_id
-
(Required) The payment ID.
Return Return
(string) The licenses.
Source Source
File: src/integrations/edd/helpers/edd-helpers.php
public function get_licenses( $order_id = 0 ) { if ( ! class_exists( '\EDD_Software_Licensing' ) ) { return ''; } $order_licenses = array(); $edd_license = \EDD_Software_Licensing::instance(); $args['payment_id'] = $order_id; $licenses = (array) $edd_license->licenses_db->get_licenses( $args ); if ( ! empty( $licenses ) ) { foreach ( $licenses as $license ) { $order_licenses[] = $license->license_key; } } return implode( ', ', $order_licenses ); }
Expand full source code Collapse full source code View on Github