strtotime( '+1 day' ), 'products' => $edd_licensed_products, ) ) ); } }, 200 ); /** * Returns licensed EDD extensions that are active on this site. * Array values are the `$item_shortname` from `\EDD_License` * * @see \EDD_License::$item_shortname * * @since 2.11.4 * @return array */ function get_licensed_extension_slugs() { $products = get_option( 'edd_licensed_extensions' ); /* * If this isn't set for some reason, fall back to trying the global. There are * probably a very limited number of cases where the option would be empty when * the global is not, but worth a shot. */ if ( empty( $products ) ) { global $edd_licensed_products; return ! empty( $edd_licensed_products ) && is_array( $edd_licensed_products ) ? $edd_licensed_products : array(); } $products = json_decode( $products, true ); return isset( $products['products'] ) && is_array( $products['products'] ) ? $products['products'] : array(); } /** * Triggers our hook for registering extensions. * This needs to run after all plugins have definitely been loaded. * * @since 2.11.4 */ add_action( 'plugins_loaded', function() { /** * Extensions should hook in here to register themselves. * * @since 2.11.4 * * @param ExtensionRegistry */ do_action( 'edd_extension_license_init', EDD()->extensionRegistry ); }, PHP_INT_MAX );