constant-contact-woocommerce
Last commit date
app
11 months ago
src
11 months ago
vendor
11 months ago
README.txt
11 months ago
plugin.php
11 months ago
uninstall.php
11 months ago
uninstall.php
34 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Handle plugin uninstall processes. |
| 4 | * |
| 5 | * @author Rebekah Van Epps <rebekah.vanepps@webdevstudios.com> |
| 6 | * @package WebDevStudios\CCForWoo\Database |
| 7 | * @since 2019-10-10 |
| 8 | */ |
| 9 | |
| 10 | if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
| 11 | exit(); |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Delete abandoned checkouts table. |
| 16 | * |
| 17 | * @author Rebekah Van Epps <rebekah.vanepps@webdevstudios.com> |
| 18 | * @since 2019-10-10 |
| 19 | */ |
| 20 | function cc_woo_delete_abandoned_checkouts_table() { |
| 21 | global $wpdb; |
| 22 | |
| 23 | $table_name = $wpdb->prefix . 'cc_abandoned_checkouts'; |
| 24 | $wpdb->query( |
| 25 | //@codingStandardsIgnoreStart |
| 26 | "DROP TABLE IF EXISTS {$table_name}" |
| 27 | //@codingStandardsIgnoreEnd |
| 28 | ); |
| 29 | |
| 30 | delete_option( 'cc_abandoned_checkouts_db_version' ); |
| 31 | } |
| 32 | |
| 33 | cc_woo_delete_abandoned_checkouts_table(); |
| 34 |