From 86759c9a1971edeba1e8bdf6461219e4c3310496 Mon Sep 17 00:00:00 2001
From: Grzegorz Rola <grola@seostudio.pl>
Date: Tue, 7 Sep 2021 20:09:42 +0200
Subject: [PATCH] feature(shops): added shops to plugin info

---
 CHANGELOG.md                                |  5 +++-
 src/Plugin/WithoutNamespace/Plugin_Info.php | 28 +++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3a7e744..5e63a15 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,11 @@
+## [2.0.0] - 2021-00-07
+### Added
+- plugin shops in WPDesk_Plugin_Info
+
 ## [1.4.4] - 2020-06-17
 ### Fixed
 - Replaced class_exists to interface_exists for interfaces
 
-
 ## [1.4.3] - 2020-06-03
 ### Fixed
 - Path for require_once
diff --git a/src/Plugin/WithoutNamespace/Plugin_Info.php b/src/Plugin/WithoutNamespace/Plugin_Info.php
index 8c29676..f6c53e2 100644
--- a/src/Plugin/WithoutNamespace/Plugin_Info.php
+++ b/src/Plugin/WithoutNamespace/Plugin_Info.php
@@ -16,6 +16,7 @@ if ( ! interface_exists( 'WPDesk_Has_Plugin_Info' ) ) {
  * have to be compatible with PHP 5.2.x
  */
 class WPDesk_Plugin_Info implements WPDesk_Translatable, WPDesk_Buildable, WPDesk_Has_Plugin_Info {
+
 	/** @var string */
 	private $plugin_file_name;
 
@@ -43,6 +44,11 @@ class WPDesk_Plugin_Info implements WPDesk_Translatable, WPDesk_Buildable, WPDes
 	/** string */
 	private $text_domain;
 
+	/**
+	 * @var array
+	 */
+	private $plugin_shops;
+
 	/**
 	 * @return string
 	 */
@@ -168,4 +174,26 @@ class WPDesk_Plugin_Info implements WPDesk_Translatable, WPDesk_Buildable, WPDes
 	public function set_text_domain( $value ) {
 		$this->text_domain = $value;
 	}
+
+	/**
+	 * @return array
+	 */
+	public function get_plugin_shops() {
+		return $this->plugin_shops;
+	}
+
+	/**
+	 * @param array $plugin_shops
+	 */
+	public function set_plugin_shops( $plugin_shops ) {
+		$this->plugin_shops = $plugin_shops;
+	}
+
+	/**
+	 * @return string
+	 */
+	public function get_plugin_slug() {
+		return basename( $this->get_plugin_dir() );
+	}
+
 }
-- 
GitLab