Hi @artankrasniqi1988,
At the moment we don´t know why OceanWP wants to change/sync all .qty. Perhaps you can please explain if this is needed for your theme!?
To provide a final, technical perspective on why OceanWP is built this way, and why the theory of ‘global incompatibility’ doesn’t really hold up in practice:
OceanWP is a theme that supports WooCommerce: we support native Woo features, and we took it a step further by introducing a bit more advanced features. In the WordPress ecosystem, there are two ways to build:
#1 Proprietary: Using custom classes (.owp-qty-input) that only your theme understands.
#2 Standardized: Using the native WooCommerce classes (.qty, .quantity) that the entire ecosystem understands.
As you already noticed on your own, we choose Standardized. Why? Because if OceanWP used proprietary classes, the thousands of plugins that interact with quantity fields (dynamic pricing, tiered discounts, shipping calculators, etc) would all stop working the moment you activated OceanWP. By targeting ‘.qty’, we ensure that 99% of the thousands of Woo related plugins on the market ‘just work’.
The function you highlighted is a core UX feature. Modern users expect that if they change a quantity in a Floating Bar, or Quick View, the value remains synchronized across the entire page. Our global listener on .qty facilitates this.
If a third party plugin (like WPC bundle) introduces a unique ‘sub-product’ quantity field that uses the standard Woo class but shouldn’t sync with the main product, it is standard development practice for that plugin to handle its own event propagation.
OceanWP has quite a number of active installations and powers a massive portion of the WooCommerce web. If targeting the native ‘.qty’ class caused ‘unwanted global effects’ for grouped products or other plugins, our support forums would be flooded with these reports daily.
The reality is quite different, and this forum speaks for itself.
As noted by the other user in the thread you shared, the solution is already built into that plugin:
“Enable the ‘Show plus/minus button’ setting within the WPC plugin. This toggle exists specifically because the plugin developers are aware of how global theme scripts interact with standard WooCommerce classes. https://postimg.cc/7f02VSwf
If you’re indeed using the same plugin as the user from the thread you shared, I strongly recommend going with the native plugin option to support correct functionality, instead of custom codes.
To summarize: we won’t be changing the core targeting of .qty because doing so would break compatibility for the vast majority of our users who rely on the theme following the WooCommerce standard. The ‘workaround’ is simply to use the plugin as intended by its developers