Title: doesn&#039;t work width WordPress 3.8.15
Last modified: September 1, 2016

---

# doesn't work width WordPress 3.8.15

 *  Resolved [munyagu](https://wordpress.org/support/users/munyagu/)
 * (@munyagu)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/)
 * Hi,
 * Thank you for your nice plugin.
 * But I saw an error message below.
 * > Fatal error: Call to undefined method wpdb::esc_like() in /home/ouchisuper/
   > naturalbeautyandthebeast.com/public_html/wp-content/plugins/wp-product-feed-
   > manager/includes/data/class-queries.php on line 348
 * wpdb::esc_like introduced WordPress ver4.0 .
    According to description of plugin,“
   Requires: 3.8 or higher”.
 * Is this description mistake ?
 * [https://wordpress.org/plugins/wp-product-feed-manager/](https://wordpress.org/plugins/wp-product-feed-manager/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Contributor [wpmarketingrobot](https://wordpress.org/support/users/wpmarketingrobot/)
 * (@wpmarketingrobot)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-7714807)
 * Hi,
 * This should be fine.
    The plugin is working fine in WordPress versions from 3.8
   or higher.
 * What version do you have?
 * Did you try to disable all plugins and reactivating them one by one.
    Same with
   your theme, disable it and check if there is the issue.
 * Let me know!
 *  Thread Starter [munyagu](https://wordpress.org/support/users/munyagu/)
 * (@munyagu)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-7714944)
 * Hi,
 * I have a clean installation of WordPress 3.8.15.
    After that , I installed WooCommerce
   2.3.0 and WP Product Feed Manager 1.1.0. I registered the products, and the setting
   of the feed, has pressed the “Save & Generate Feed” button .
 * Under process animation does not stop forever .
    And error message is logged.
 *  Plugin Author [AukeJomm](https://wordpress.org/support/users/aukejomm/)
 * (@aukejomm)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-7714951)
 * Did you update all other plugins in your shop?
 * Did you try to disable all plugins and reactivating them one by one.
    Same with
   your theme, disable it and check if there is the issue.
 * Auke
 *  Thread Starter [munyagu](https://wordpress.org/support/users/munyagu/)
 * (@munyagu)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-7714953)
 * Helo Auke,
 * Other than those installed in the above steps do not activate.
 * Active plugins are only bellow.
    WooCommerce 2.3.0（This plug-in is a necessary
   for the operation of WP Product Feed Manager.） WP Product Feed Manager 1.1.0
 * Using theme is bellow.
    Twenty Fourteen
 * wpdb::esc_like method is not included in the WordPress 3.8.15, I think that There
   is no way to work.
    Am I wrong here?
 *  Plugin Contributor [wpmarketingrobot](https://wordpress.org/support/users/wpmarketingrobot/)
 * (@wpmarketingrobot)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-7721357)
 * Hello Munyagu,
 * We do not use wpdb::esc_like method.
    It is not used throughout the plugin and
   not used in class-queries.php on line 348
 * You will have to upgrade to the minimum requirements from Woocommerce.
    They 
   make use of the function and require you to use alt least version 4.4
 * Best regards,
 * Auke
 *  Thread Starter [munyagu](https://wordpress.org/support/users/munyagu/)
 * (@munyagu)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-8133326)
 * Hi wpmarketingrobot.
 * I download now version 1.1.0 and find it.
 * declare variable　member for wpdb
 *     ```
       26:	class WPPFM_Queries {
       27:
       28:		// @private storage for global wpdb
       29:		private $_wpdb;
       ```
   
 * set global $wpdb to member in constructor
 *     ```
       38:		public function __construct() {
       39:
       40:			// get global wordpress database functions
       41:			global $wpdb;
       42:
       43			// assign the global wpdb to a varable
       44			$this->_wpdb = &$wpdb;
       ```
   
 * execute wpdb::esc_like in get_custom_product_fields method
 *     ```
       340:		public function get_custom_product_fields() {
       341:
       342:			$main_table	 = $this->_wpdb->postmeta;
       343:			$limit		 = apply_filters( 'postmeta_form_limit', 30 );
       344:			$sql		 = "SELECT DISTINCT meta_key FROM $main_table 
       345:				WHERE meta_key NOT BETWEEN '_' AND '_z' HAVING meta_key NOT LIKE %s
       346:				ORDER BY meta_key LIMIT %d";
       347:
       348:			return $this->_wpdb->get_col( $this->_wpdb->prepare( $sql, $this->_wpdb->esc_like( '_' ) . '%', $limit ) ); // ← !!! HERE is $this->_wpdb->esc_like( '_' ) !!!
       349:		}
       ```
   
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-8135760)
 * Hi munyagu,
 * I’m sorry, you’re right. Coincidentally this function was changed in my work 
   version so when I searched in my work version I could not find it and I did look
   at an older version to check if it maybe was in an older version, but there this
   call to esc_like() was not implemented yet. So I could not find it, whilst it
   was in the version you were using.
 * In the version for the next update the code will look like
 *     ```
       public function get_custom_product_fields() {
   
           $main_table = $this->_wpdb->postmeta;
   
           return $this->_wpdb->get_col( "SELECT DISTINCT meta_key FROM $main_table WHERE meta_key NOT BETWEEN '_' AND '_z' OR meta_key LIKE '_cpf_%' OR meta_key LIKE '_wpmr_%' ORDER BY meta_key" );
       }
       ```
   
 * You could change the code in your copy of the plugin to this and that should 
   prevent the error from showing.
    -  This reply was modified 9 years, 8 months ago by [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/).
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-8135784)
 * By the way, the next update will off course use this new function and thus fix
   this issue.
 *  Thread Starter [munyagu](https://wordpress.org/support/users/munyagu/)
 * (@munyagu)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-8137021)
 * Thank you for your answers, Michel.
 * I wait for your next release.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘doesn't work width WordPress 3.8.15’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-product-feed-manager_228bdf.svg)
 * [WPMR Google Feed Manager for WooCommerce – Sell on Google Merchant Center & Shopping](https://wordpress.org/plugins/wp-product-feed-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-product-feed-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-product-feed-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-product-feed-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-product-feed-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-product-feed-manager/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [munyagu](https://wordpress.org/support/users/munyagu/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/doesnt-work-width-wordpress-3815/#post-8137021)
 * Status: resolved