Your IP : 3.148.115.16


Current Path : /home/church/www/mekhimalachi.org/wp-content/plugins/woo-variation-swatches/
Upload File :
Current File : /home/church/www/mekhimalachi.org/wp-content/plugins/woo-variation-swatches/uninstall.php

<?php
	/**
	 * Uninstall plugin
	 */
	
	// If uninstall not called from WordPress exit
	defined( 'WP_UNINSTALL_PLUGIN' ) or die( 'Keep Silent' );
	
	global $wpdb;
	
	// change to select type when uninstall
	$table_name = $wpdb->prefix . 'woocommerce_attribute_taxonomies';
	$query      = $wpdb->query( "UPDATE `$table_name` SET `attribute_type` = 'select' WHERE `attribute_type` != 'text'" );
	$wpdb->query( $query );
	
	// Remove Option
	delete_option( 'woo_variation_swatches' );
	// Site options in Multisite
	delete_site_option( 'woo_variation_swatches' );