Tell us what you are trying to do?
Hi , I try to hide Add to cart button on product single page if no authorisations provided for user. I've been able to show button only with this strange combination of href short code. Unfortunately this code inside [wpv-conditional] shows 404 Error when I push the "Add to cart button" (please see the link - hidden link )
The address line in. browser looks like this - hidden link; ... so the only problem looks in '%20' which is actually ' ' in standart woocommerce shortcode [add to cart_url id=""]
Is there way to fix it (I mean what is the right syntax should be) inside the toolset conditions...
[code]
[wpv-conditional if="(( metadata_exists( post, [wpv-post-id], s2member_ccaps_req ) eq 1 ) AND ( '[wpv-current-user info='logged_in']' eq 'true' ) AND (current_user_can('access_s2member_ccap_[wpv-post-id]') eq 1 )) OR ( metadata_exists( post, [wpv-post-id], s2member_ccaps_req ) ne 1 )"]<div> Добавить</div>
[/wpv-conditional]
[/code]
P.s. switching to the [wpv-woo-buy-options] looks like options - button even didn't showing up on single page
Hello,
I have tried it in my localhost with a fresh WP installation + the latest version of Toolset plugin + Woocommerce plugin, it works fine, I can see the button in front-end, and the link works well too.
Please check these:
1) Make sure you are putting those codes in a pure text editor,
2) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
3) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again