Hi,
It says –
This plugin is incompatible with the enabled WooCommerce feature 'High-Performance order storage', it shouldn't be activated.?Manage WooCommerce features
Can it be fixed?
Thanks
]]>In 2024, more ecommerce sites are planning a move to HPOS data storage.
This plugin is marked as not compliant with HPOS data storage.
Is this true, and if so, is it something that would be very difficult to implement?
]]>I’m not sure if this plugin is still supported or abandoned – it appears that anyone who asks just gets their comment thread closed so maybe we all have our answer?
Support status for HPOS tables for WC have not been declared, and support for recent WP and WC versions has not been clarified which would be courteous to users.
Pretty useful plugin though which is why I’m here to provide some assistance and suggestion for improvement.
As some commenters have asked about there are some holes in this method – no shade on author, he’s just using a builtin hook in woo but implementing it nicely as a plugin.
The holes are as stated about yith wishlist – and I can confirm also with CommerceGurus Commercekit wishlist function (and probably others) – that if a customer adds a “non-purchasable” product to their wishlist, then visits the wishlist page, they will be presented with an “add to cart” button, which dutifully and blindly bypasses the plugins intended purpose, and allows purchase of ostensibly ‘non-purchasable’ products.
The second hole is of course that by inspecting a product page using developer tools in any browser, a sneaky customer could still retrieve the product ID (eg:59) and then visit “www.exampleshop.com/?add-to-cart=59&quantity=1” whereby the product will be added to cart anyway.
Although I have personally patched my CommerceKit plugin to render a “Non-purchasable” button instead of rendering the add to cart button in the wishlist table, I thought I might also share a solution which may “head em off at the pass” so to speak.
The below code will run a check when visiting the cart page and remove any “non-purchasable” products that may’ve been added to the cart via either of the above (or other) means.
// This function checks for items that are non-purchasable but have been added to the cart via sneaky methods (wishlist plugs and or direct url additions).
function check_for_sneaky_non_purchasable_products_added() {
if ( WC()->cart->is_empty() ) {
return;
}
$removed_products = [];
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
$product_obj = $cart_item['data'];
$nonbuyablecheck = get_post_meta($product_obj->get_id(), '_not_buyable', yes);
if ( $nonbuyablecheck == 'yes' ) {
WC()->cart->remove_cart_item( $cart_item_key );
$removed_products[] = $product_obj;
}
}
if (!empty($removed_products)) {
wc_clear_notices(); // remove any WC notice about sorry about out of stock products to be removed from cart.
foreach ( $removed_products as $idx => $product_obj ) {
$product_name = $product_obj->get_title();
$msg = sprintf( __( "The product '%s' was removed from your cart because it is non-purchasable online. Not sure how you added it to cart, but it is now removed.", 'woocommerce' ), $product_name);
wc_add_notice( $msg, 'error' );
}
}
}
add_action('woocommerce_before_cart', 'check_for_sneaky_non_purchasable_products_added');
add_action('woocommerce_review_order_before_cart_contents', 'check_for_sneaky_non_purchasable_products_added');
The above code is a quick hacky solution, but is confirmed working as of time of writing. It can be implemented using a code snippet plugin, a standalone snippet plugin of you own making, or by adding to functions.php of your theme.
I hope this might help out anyone scratching their head as to how a customer ordered a product which they defined as not buyable.
Please use it with caution – if you’re not comfortable with code snippets at least, then i recommend passing it to a developer to implement in a safe way – you really don’t wanna be breaking cart or checkout pages so please be careful.
Of course if anyone has additions to the code or suggestions or something I’ve missed please do reply and help everyone out – me included!
Hope this helps someone, have a great day everyone! ??
]]>Hi, im use this plugin and its working fine except a small missing functionality.
Please add the ability so when we set a product non Purchasable to hide also the price,
The best idea is when a product is non Purchasable we display only
the variation options such as colors, dimensions etc so the user know that the product have variants and also availability of the product should be show, except for the price or its variant prices.
Thank you in advance!
]]>Hello,
we have on the e-shop plugin YITH wishlist. You can still add the non-purchasable product to the cart in the my account / wishlist.
Is there any compatibility between the plugins?
Thank you.
P.
Hello,i can’t find non purchasable in the product area when am creating product so that i can tick the non purchasable tick box. Pls help
]]>Hello,
I have a simple product with three product Add-On options. The total price will be calculated after selecting the options.
When turning on non-purchasable, the add-ons will disappear.
When I change it from simple to variation product and add one variation, the add-ons will be visible again.
Is there a way to make non-purchasable plugin work with simple product, product add-ons, but without variations?
Thank you for your help
]]>Hi,
I saw that the plugin is compatible with wpml. Where can I translate the message on product page? I can’t find it in stringtranslation (also after a scan).
L
]]>I’m trying out this plugin, and it’s working alright. However, I have two problems:
1. I don’t want the price to be shown. I can leave that field blank, but the currency switcher plugin will still insert the currency in the empty price field
2. The availability is being displayed. I have physical products, and I want their stock status to be visible
Would it be possible to get this plugin to completely disable both the price and availability/stock fields for non-purchasable products?
]]>Is your plugin abandoned?
]]>Hi
Great plugin, exactly what I’m after except…
… can you reverse how it works? I have about 1000 products and only want to sell ten. So rather than having to select 990 of them as unbuyable is it possible to select the 10 as buyable.
I thought I could change the code in frontFunctions.php lines 12 -14 and switch the true and false around. This did show the button on the selected products and hide it on the others, but nothing gets added to the cart when I click on it.
So basically my question is there a simple way of changing the code so that selected products become buyable and not unbuyable?
thanks
]]>Dear,
Plug is is “Not tested with latest version of woocommerce”
Can you please test & update?
Thanks
]]>Hi,
Non purchasable label does not display when using Elementor Template for WC single product post. See vid : https://www.loom.com/share/4a23dbc1b34142eb860b4effe5902837
Is there a way to make that possible ?
Thanks
]]>Hi,
Thanks for the great plugin. I want to create a page with purchasable products and another page with non-purchasable products. Is there a woocommerce shortcode available to use ?
Thanks in advance!
]]>Great plugin, I’m using it but the check/X in the admin under purchasable is incorrect, shows random values, about half of the products are shown as non-purchasable but NONE have the checkbox checked under the item. Anything I can do/check to correct this?
Thanks
Scott
Hello,
Thank you for the plugin. It should work perfectly.
However, do you plan to add WPML compatibility?
Thank you,
]]>Hi,
I’m looking to display only non purchasable products on specific archive page. Is there a way to set that ?
Thanks for your support
]]>I’m an issue on our site where the non-purchaseable X does not go away on new products – whether it is ticked or unticked. There is another ticket open on same issue, but there was no solution.
leverarms.com
WooCommerce version: Version 3.5.5
Plugin version 1.2
Any help on sorting this out would be appreciated.
]]>Hi there,
When an item is set as non-purchasable, I want to target the button on the single product page.
I know that I can use the woocommerce_single_product_summary
action hook, but it is targeting ALL products. How can I set a conditional so that ONLY the non-purchasable items are affected?
Thanks,
Matt
Hi,
Non purchasable label does not display when using Elementor Template for WC product.
Is there a way to make that possible ?
Thanks
]]>I just wanted to make sure this is still compatible with WP 5.0.2 and Woocommerce 3.5.3 before I install it.
]]>Hi,
Thanks for you plugin. Really useful for many projects.
WOuld it be possible to add some specific classes on elements, especially button.
I would like to differentiate the non purchasable button to the regular products.
Thanks
]]>Sorry to raise two tickets so close to each other, but for products that I’ve created after the plugin was installed are stuck as non-purchaseable, no matter whether the box is ticked or not.
Even if I tick, un-tick, tick, un-tick, the status doesn’t change.
]]>Hi,
This plugin looks great but I have a huge catalogue that I need to apply the setting to. Is there a way to do that quickly?
Thanks!
]]>The check box to mark a product as non purchasable has disappeared.
It is still there when a product is set to simple.
All variable products created in the past are still marked as non purchasable but new products can not be.
I deactivated the plugin to try and reset it but that didn’t work.
I also tried changing themes but that didn’t work either.
Suggestion: store true of false in _not_buyable rather than yes|no
]]>The plugin works in terms of the product display the message
But the user still can buy it!