File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 55namespace Dwnload \EddSoftwareLicenseManager \Edd ;
66
77use Dwnload \EddSoftwareLicenseManager \Edd \Models \LicenseStatus ;
8- use Dwnload \WpSettingsApi \Api \Options ;
98use function in_array ;
109use function sanitize_text_field ;
1110use function strtotime ;
@@ -48,19 +47,25 @@ public static function getLicenseExpires(string $plugin_id): string
4847 }
4948
5049 /**
51- * Get the current plugin's license status .
50+ * Get the current plugin's license key .
5251 * @param string $plugin_id The plugin slug.
5352 * @return string
5453 */
55- public static function getLicenseStatus (string $ plugin_id ): string
54+ public static function getLicenseKey (string $ plugin_id ): string
5655 {
5756 $ data = self ::getLicenseData ();
58- return sanitize_text_field ($ data [$ plugin_id ]['status ' ] ?? LicenseStatus:: LICENSE_INACTIVE );
57+ return sanitize_text_field ($ data [$ plugin_id ]['license ' ] ?? '' );
5958 }
6059
61- public static function getLicenseKey (string $ plugin_id , string $ section_id ): string
60+ /**
61+ * Get the current plugin's license status.
62+ * @param string $plugin_id The plugin slug.
63+ * @return string
64+ */
65+ public static function getLicenseStatus (string $ plugin_id ): string
6266 {
63- return sanitize_text_field (Options::getOption ($ plugin_id , $ section_id ));
67+ $ data = self ::getLicenseData ();
68+ return sanitize_text_field ($ data [$ plugin_id ]['status ' ] ?? LicenseStatus::LICENSE_INACTIVE );
6469 }
6570
6671 /**
You can’t perform that action at this time.
0 commit comments