constant-contact-woocommerce
Last commit date
app
1 year ago
src
1 year ago
vendor
1 year ago
README.txt
1 year ago
composer.json
1 year ago
composer.lock
1 year ago
docker_tag
1 year ago
output.log
1 year ago
plugin.php
1 year ago
uninstall.php
1 year 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 |