Server IP : 14.241.111.210 / Your IP : 3.22.116.191 Web Server : Apache System : Linux localhost.localdomain 3.10.0-1160.66.1.el7.x86_64 #1 SMP Wed May 18 16:02:34 UTC 2022 x86_64 User : www ( 1001) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/binhminhhouse.vn/wp-content/plugins/woocommerce/ |
Upload File : |
<?php /** * WooCommerce Uninstall * * Uninstalling WooCommerce deletes user roles, pages, tables, and options. * * @package WooCommerce\Uninstaller * @version 2.3.0 */ defined( 'WP_UNINSTALL_PLUGIN' ) || exit; global $wpdb, $wp_version; wp_clear_scheduled_hook( 'woocommerce_scheduled_sales' ); wp_clear_scheduled_hook( 'woocommerce_cancel_unpaid_orders' ); wp_clear_scheduled_hook( 'woocommerce_cleanup_sessions' ); wp_clear_scheduled_hook( 'woocommerce_cleanup_personal_data' ); wp_clear_scheduled_hook( 'woocommerce_cleanup_logs' ); wp_clear_scheduled_hook( 'woocommerce_geoip_updater' ); wp_clear_scheduled_hook( 'woocommerce_tracker_send_event' ); /* * Only remove ALL product and page data if WC_REMOVE_ALL_DATA constant is set to true in user's * wp-config.php. This is to prevent data loss when deleting the plugin from the backend * and to ensure only the site owner can perform this action. */ if ( defined( 'WC_REMOVE_ALL_DATA' ) && true === WC_REMOVE_ALL_DATA ) { include_once dirname( __FILE__ ) . '/includes/class-wc-install.php'; // Roles + caps. WC_Install::remove_roles(); // Pages. wp_trash_post( get_option( 'woocommerce_shop_page_id' ) ); wp_trash_post( get_option( 'woocommerce_cart_page_id' ) ); wp_trash_post( get_option( 'woocommerce_checkout_page_id' ) ); wp_trash_post( get_option( 'woocommerce_myaccount_page_id' ) ); wp_trash_post( get_option( 'woocommerce_edit_address_page_id' ) ); wp_trash_post( get_option( 'woocommerce_view_order_page_id' ) ); wp_trash_post( get_option( 'woocommerce_change_password_page_id' ) ); wp_trash_post( get_option( 'woocommerce_logout_page_id' ) ); if ( $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->prefix}woocommerce_attribute_taxonomies';" ) ) { $wc_attributes = array_filter( (array) $wpdb->get_col( "SELECT attribute_name FROM {$wpdb->prefix}woocommerce_attribute_taxonomies;" ) ); } else { $wc_attributes = array(); } // Tables. WC_Install::drop_tables(); // Delete options. $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'woocommerce\_%';" ); $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'widget\_woocommerce\_%';" ); // Delete usermeta. $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key LIKE 'woocommerce\_%';" ); // Delete posts + data. $wpdb->query( "DELETE FROM {$wpdb->posts} WHERE post_type IN ( 'product', 'product_variation', 'shop_coupon', 'shop_order', 'shop_order_refund' );" ); $wpdb->query( "DELETE meta FROM {$wpdb->postmeta} meta LEFT JOIN {$wpdb->posts} posts ON posts.ID = meta.post_id WHERE posts.ID IS NULL;" ); $wpdb->query( "DELETE FROM {$wpdb->comments} WHERE comment_type IN ( 'order_note' );" ); $wpdb->query( "DELETE meta FROM {$wpdb->commentmeta} meta LEFT JOIN {$wpdb->comments} comments ON comments.comment_ID = meta.comment_id WHERE comments.comment_ID IS NULL;" ); $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}woocommerce_order_items" ); $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}woocommerce_order_itemmeta" ); // Delete terms if > WP 4.2 (term splitting was added in 4.2). if ( version_compare( $wp_version, '4.2', '>=' ) ) { // Delete term taxonomies. foreach ( array( 'product_cat', 'product_tag', 'product_shipping_class', 'product_type' ) as $taxonomy ) { $wpdb->delete( $wpdb->term_taxonomy, array( 'taxonomy' => $taxonomy, ) ); } // Delete term attributes. foreach ( $wc_attributes as $taxonomy ) { $wpdb->delete( $wpdb->term_taxonomy, array( 'taxonomy' => 'pa_' . $taxonomy, ) ); } // Delete orphan relationships. $wpdb->query( "DELETE tr FROM {$wpdb->term_relationships} tr LEFT JOIN {$wpdb->posts} posts ON posts.ID = tr.object_id WHERE posts.ID IS NULL;" ); // Delete orphan terms. $wpdb->query( "DELETE t FROM {$wpdb->terms} t LEFT JOIN {$wpdb->term_taxonomy} tt ON t.term_id = tt.term_id WHERE tt.term_id IS NULL;" ); // Delete orphan term meta. if ( ! empty( $wpdb->termmeta ) ) { $wpdb->query( "DELETE tm FROM {$wpdb->termmeta} tm LEFT JOIN {$wpdb->term_taxonomy} tt ON tm.term_id = tt.term_id WHERE tt.term_id IS NULL;" ); } } // Clear any cached data that has been removed. wp_cache_flush(); }