From b9ad68abbf50843cba715710bf7f2cdffeb39846 Mon Sep 17 00:00:00 2001
From: Grzegorz Rola <grola@seostudio.pl>
Date: Wed, 9 Oct 2019 16:23:00 +0000
Subject: [PATCH] Feature/wp nonce

---
 CHANGELOG.md                      | 4 ++++
 src/Basic_Requirement_Checker.php | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index dbc95e6..03827dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## [3.0.5] - 2019-09-20
+### Fixed
+- Fixed missing wp_create_nonce function
+
 ## [3.0.4] - 2019-09-20
 ### Fixed
 - Fixed missing wp_nonce_url function
diff --git a/src/Basic_Requirement_Checker.php b/src/Basic_Requirement_Checker.php
index a707ac5..40b7aef 100644
--- a/src/Basic_Requirement_Checker.php
+++ b/src/Basic_Requirement_Checker.php
@@ -312,7 +312,7 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
 		private function prepare_plugin_repository_install_url( $plugin_info ) {
 			$slug = basename( $plugin_info[ self::PLUGIN_INFO_KEY_NAME ] );
 			$install_url = self_admin_url( 'update.php?action=install-plugin&plugin=' . $slug );
-			if ( function_exists( 'wp_nonce_url' ) ) {
+			if ( function_exists( 'wp_nonce_url' ) && function_exists( 'wp_create_nonce' ) ) {
 				$install_url = wp_nonce_url( $install_url, 'install-plugin_' . $slug );
 			}
 			add_filter( 'plugins_api', function ( $api, $action, $args ) use ( $plugin_info, $slug ) {
-- 
GitLab