Title: Issue
Last modified: November 7, 2018

---

# Issue

 *  [encoder21](https://wordpress.org/support/users/encoder21/)
 * (@encoder21)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/issue-50/)
 * Hi, trying to hide a product on woocommerce I got this error:
 * Warning: get_class() expects parameter 1 to be object, string given in C:\…\availability-
   scheduler-for-woocommerce\azh_woo_availability_scheduler.php on line 151
 * The line is:
 * if (is_object($product) && get_class(‘WC_Product’))
 * you could fix it simply checking if global $product is a product, or rather, 
   change lines 151 and 194 to:
 *  if(is_product($product))
 * I hope I have been helpful (even if didn’t check for related issues or side effects..)

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

 *  Plugin Author [azexo](https://wordpress.org/support/users/azexo/)
 * (@azexo)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/issue-50/#post-10858794)
 * Hi,
    thank you i fixed it please update
 *  [tomsychau](https://wordpress.org/support/users/tomsychau/)
 * (@tomsychau)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/issue-50/#post-11076656)
 * after I installed the plugin I encountered this error. Please check.
 * Warning: array_keys() expects parameter 1 to be array, null given in /home4/abnaca/
   diamond-sushi.com/wp-content/plugins/marketing-automation-by-azexo/azh_marketing_automation.
   php on line 641
 * Warning: in_array() expects parameter 2 to be array, null given in /home4/abnaca/
   diamond-sushi.com/wp-content/plugins/marketing-automation-by-azexo/azh_marketing_automation.
   php on line 641

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

The topic ‘Issue’ is closed to new replies.

 * ![](https://ps.w.org/availability-scheduler-for-woocommerce/assets/icon-128x128.
   png?rev=1851502)
 * [Availability Scheduler for WooCommerce](https://wordpress.org/plugins/availability-scheduler-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/availability-scheduler-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/availability-scheduler-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/availability-scheduler-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/availability-scheduler-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/availability-scheduler-for-woocommerce/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [tomsychau](https://wordpress.org/support/users/tomsychau/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/issue-50/#post-11076656)
 * Status: not resolved