Created
May 23, 2023 06:55
-
-
Save gdarko/5d6d8859037ba2f3281e062688d680c4 to your computer and use it in GitHub Desktop.
Simple plugin to disable the software parameter in the REST API activate endpoint when using Digital License Manager Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: DLM Disable Software from REST API | |
* Description: Sample plugin that disables software requirement for software parameter in activate endpoint in the rest api. | |
* Author: Darko Gjorgjijoski | |
* Version: 1.0.0 | |
* License: GPLv2 or later | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
return; | |
} | |
class DLM_Pro_RESTAPI_Disable_Software { | |
/** | |
* Constructor | |
*/ | |
public function __construct() { | |
add_filter('dlm_rest_api_license_activation_require_software_param', '__return_false'); | |
} | |
} | |
new DLM_Pro_RESTAPI_Disable_Software(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment