api_url = trailingslashit( FUSION_UPDATES_URL ); } /** * Gets the download URL for a plugin. * * @access public * @since 5.0.0 * @param string $download The plugin to download. * @param string|false $token Force-use a token, or use default if false. * @return string|false */ public function get_package( $download, $token = false ) { $api_args = [ 'avada_action' => 'get_download', 'item_name' => rawurlencode( $download ), 'ver' => Avada::get_theme_version(), ]; if ( Avada()->registration->is_registered() ) { $api_args['code'] = Avada()->registration->get_purchase_code(); } elseif ( Avada()->registration->legacy_support() ) { $api_args['token'] = Avada()->registration->get_token(); } elseif ( ! Avada()->registration->bypass_active() ) { return false; } return add_query_arg( $api_args, $this->api_url ); } }