Merge pull request #14036 from woocommerce/fix/14032
Make sure we have a prefix for strstr
This commit is contained in:
commit
9a219b71da
|
@ -75,11 +75,14 @@ class WC_Customer_Data_Store extends WC_Data_Store_WP implements WC_Customer_Dat
|
|||
*/
|
||||
protected function exclude_internal_meta_keys( $meta ) {
|
||||
global $wpdb;
|
||||
|
||||
$table_prefix = $wpdb->prefix ? $wpdb->prefix : 'wp_';
|
||||
|
||||
return ! in_array( $meta->meta_key, $this->internal_meta_keys )
|
||||
&& 0 !== strpos( $meta->meta_key, 'closedpostboxes_' )
|
||||
&& 0 !== strpos( $meta->meta_key, 'metaboxhidden_' )
|
||||
&& 0 !== strpos( $meta->meta_key, 'manageedit-' )
|
||||
&& ! strstr( $meta->meta_key, $wpdb->prefix )
|
||||
&& ! strstr( $meta->meta_key, $table_prefix )
|
||||
&& 0 !== stripos( $meta->meta_key, 'wp_' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue