PluginProbe
AppMySite – WordPress & WooCommerce Mobile App Builder (No-Code Android & iOS App Maker) / trunk
AppMySite – WordPress & WooCommerce Mobile App Builder (No-Code Android & iOS App Maker) vtrunk
3.15.4 trunk 2.0.0 2.1.0 2.10.0 2.11.0 2.2.0 2.3.0 2.4.0 2.4.1 2.5.0 2.6.0 2.6.1 2.7.0 2.8.0 2.8.1 2.9.0 2.9.1 3.0.0 3.0.1 3.1.0 3.10.0 3.11.0 3.11.1 3.11.2 All 48 releases
appmysite / uninstall.php

uninstall.php in AppMySite – WordPress & WooCommerce Mobile App Builder (No-Code Android & iOS App Maker) trunk, at uninstall.php

42 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Fired when the plugin is uninstalled.
5 *
6 */
7
8 // If uninstall not called from WordPress, then exit.
9 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
10 exit;
11 }
12 //load
13 require_once __DIR__ . '/vendor/autoload.php';
14
15 try {
16 $config_transformer = new WPConfigTransformer( get_config_path() );
17
18 if ( $config_transformer->exists( 'constant', 'AMS_LICENSE_KEY' ) ) {
19 // update constant
20 $config_transformer->remove( 'constant', 'AMS_LICENSE_KEY', array( 'normalize' => true ) ); //'raw' => true
21 $config_transformer->remove( 'constant', 'AMS_LICENSE_STATUS', array( 'normalize' => true ) );
22
23 }
24
25 } catch ( \Exception $e ) {
26 $messsage = 'Caught Exception: \Fragen\WP_Debugging\Settings::add_constants() - ' . $e->getMessage();
27 // error_log( $messsage );
28 wp_die( esc_html( $messsage ) );
29 }
30
31 function get_config_path() {
32 $config_path = ABSPATH . 'wp-config.php';
33
34 if ( ! file_exists( $config_path ) ) {
35 if ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
36 $config_path = dirname( ABSPATH ) . '/wp-config.php';
37 }
38 }
39
40 return apply_filters( 'wp_debugging_config_path', $config_path );
41 }
42