HEX
Server: LiteSpeed
System: Linux lp015.web24.net.au 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64
User: pgkdistr (10190)
PHP: 8.1.32
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/pgkdistribution.com.au/httpdocs/wp-content/plugins/myob-integration/uninstall.php
<?php // exit if uninstall constant is not defined
if (!defined('WP_UNINSTALL_PLUGIN')) {
exit;
}


// delete settings

delete_option( 'woocommerce_MYOB_integrations_settings' );

delete_option( 'WC_MYOB_client_id' );
delete_option( 'WC_MYOB_secret' );
delete_option( 'WC_MYOB_code' );
delete_option( 'MYOB_access_token' );
delete_option( 'MYOB_access_refresh_token' );
delete_option( 'MYOB_access_token_type' );
delete_option( 'MYOB_access_token_scope' );

delete_option( 'WC_MYOB_asset_accounts_list' );
delete_option( 'WC_MYOB_cogs_accounts_list' );
delete_option( 'WC_MYOB_company_file_list' );
delete_option( 'WC_MYOB_expense_accounts_list' );
delete_option( 'WC_MYOB_income_accounts_list' );
delete_option( 'WC_MYOB_tax_codes_list' );
delete_option( 'WC_MYOB_refresh_token_timestamp' );

// delete_option( 'myob_customer_count' );
// delete_option( 'myob_customer_pull_next_url' );
// delete_option( 'myob_customer_synced_count' );
delete_option( 'myob_product_count' );
delete_option( 'myob_product_pull_next_url' );
delete_option( 'myob_product_synced_count' );

//Clear transients
delete_transient( 'MYOB_keep_alive_transient' );
delete_transient( 'MYOB_keep_alive_run' );
//Clear scheduled events
wp_clear_scheduled_hook('WC_MYOB_keep_alive_transient_cron');
wp_clear_scheduled_hook('WC_MYOB_sync_cron');
wp_clear_scheduled_hook('WC_MYOB_access_cron');
wp_clear_scheduled_hook('myob_process_product_sync');