We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8cf8fc5 + 86f56f4 commit e81ae86Copy full SHA for e81ae86
inc/namespace.php
@@ -41,6 +41,19 @@ function on_plugins_loaded() {
41
}
42
43
44
+
45
+ // check whether we have the client id and secret key variables/secrets set
46
+ $client_id = Altis\get_variable( 'PATCHSTACK_CLIENTID' );
47
+ $secret_key = Altis\get_variable( 'PATCHSTACK_SECRETKEY' );
48
+ if ( $client_id && $secret_key ) {
49
+ // check if the plugin is already connected
50
+ if ( get_option( 'patchstack_clientid', false ) === false || get_option( 'patchstack_secretkey', false ) == false ) {
51
+ // set the client id and secret key
52
+ update_option( 'patchstack_clientid', $client_id );
53
+ update_option( 'patchstack_secretkey', $secret_key );
54
+ // The plugin will self activate from here
55
+ }
56
57
58
59
0 commit comments