1 | <?php |
||
2 | /** |
||
3 | * Delete the saved options freom the database when we uninstall the plugin |
||
4 | * We do not do it when we deactivate the plugin, in case we want to maintain the data |
||
5 | * |
||
6 | * @package algolia-woo-indexer |
||
7 | */ |
||
8 | |||
9 | /* |
||
10 | * If uninstall was not called from WordPress, then exit |
||
11 | */ |
||
12 | if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
||
13 | exit; |
||
14 | } |
||
15 | |||
16 | define( 'ALGOWOO_DB_OPTION', '_algolia_woo_indexer' ); |
||
17 | |||
18 | delete_option( ALGOWOO_DB_OPTION . '_application_id' ); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
19 | delete_option( ALGOWOO_DB_OPTION . '_admin_api_key' ); |
||
20 | delete_option( ALGOWOO_DB_OPTION . '_index_name' ); |
||
21 | delete_option( ALGOWOO_DB_OPTION . '_index_in_stock' ); |
||
22 | delete_option( ALGOWOO_DB_OPTION . '_automatically_send_new_products' ); |
||
23 |