Title: Inappropriate method used
Last modified: July 12, 2026

---

# Inappropriate method used

 *  [Habib Mosavi](https://wordpress.org/support/users/habibmosavi/)
 * (@habibmosavi)
 * [8 hours, 41 minutes ago](https://wordpress.org/support/topic/inappropriate-method-used/)
 * Hi WPClever team,
 * I found what appears to be a compatibility issue in WPC Shared Stock (v1.1.5)
   when used with WooCommerce (10.9.4) variable products.
 * When a variation is assigned to a shared stock group, it becomes non-purchasable
   on the frontend. The product page shows “Please choose a different option”, and
   the variation JSON (`data-product_variations`) contains `"is_purchasable": false`,
   even though the variation is enabled, has a valid price, and the shared stock
   group has available stock.
 * After debugging, I found that the plugin checks the variation’s visibility using`
   is_visible()`. Replacing this with `variation_is_visible()` in `/includes/class-
   frontend.php:134` resolves the issue, and the variation becomes purchasable again.
 * It seems `variation_is_visible()` is the appropriate method for checking the 
   visibility of product variations in this context.
 * Could you please review this and include a fix in a future release?
 * Thank you!

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finappropriate-method-used%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wpc-shared-stock/assets/icon-128x128.png?rev=3521887)
 * [WPC Shared Stock - Attribute Stock & Group Stock for WooCommerce](https://wordpress.org/plugins/wpc-shared-stock/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpc-shared-stock/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpc-shared-stock/)
 * [Active Topics](https://wordpress.org/support/plugin/wpc-shared-stock/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpc-shared-stock/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpc-shared-stock/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Habib Mosavi](https://wordpress.org/support/users/habibmosavi/)
 * Last activity: [8 hours, 41 minutes ago](https://wordpress.org/support/topic/inappropriate-method-used/)
 * Status: not resolved