Created
October 11, 2018 11:44
-
-
Save webdados/dc29f36572d7e3d54ac215d24d77e39f to your computer and use it in GitHub Desktop.
Unregister all strings of a specific textdomain from WPML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('WP_USE_THEMES', false); | |
require('./wp-blog-header.php'); | |
$domain = 'woocommerce'; //Change textdomain as needed | |
$arr = array(); | |
$sql = sprintf( "SELECT id FROM ix_icl_strings WHERE context='%s'", $domain ); | |
$strings = $wpdb->get_results( $sql ); | |
foreach ( $strings as $string ) { | |
$arr[] = $string->id; | |
} | |
wpml_unregister_string_multi( $arr ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment