Ramon Ahnert
Forum Replies Created
-
Forum: Plugins
In reply to: [Require Login for WooCommerce] invisible selectorAs we didn’t have any movement on this issue for a while now, I’m now closing it.
Forum: Reviews
In reply to: [Require Login for WooCommerce] Ramon Ahnert Rocks !!Forum: Plugins
In reply to: [Require Login for WooCommerce] Almost the perfect plugin I was looking for..Hi @romonoutic
It’s not something simple to add but I’d say it’s something interesting to have as a feature so thanks for bringing this up.
You can try a similar approach that I shared with other users in this forum:
add_action('template_redirect', function () { if ( ! is_product() || 123456789 !== get_the_ID() ) { remove_action( 'template_redirect', 'redirect_not_logged_users' ); } }, 5);This snippet prevents the plugin to executes its default behaviour if:
- the page is not a product page. That is, shop, cart and checkout page won’t be blocked or
- the page is a product page but the ID of the page is not equal to 123456789 (you should change it for the product ID you want to block). That is, all pages will be allowed to access except the page that has the ID equal to 123456789.
I’ve not tested but I believe it will work.
Forum: Plugins
In reply to: [Require Login for WooCommerce] invisible selector@super4tw the error on the console doesn’t help but it seems that the error is happening in another plugin.
You can use the filter
woocommerce_login_redirectto redirect to shop page. You can see how I do that in this file.Forum: Plugins
In reply to: [Require Login for WooCommerce] invisible selectorHi @super4tw
Can you check the browser’s console and share the error that appears there? You can access the console on Developer tools (Ctrl + Shift + I on Chrome).
Forum: Plugins
In reply to: [Require Login for WooCommerce] ‘After login redirect to page’Thanks for the feedback @raulsilvaitpro.
Hi @devoidf
You can add an action that removes the
redirect_not_logged_usersfunction when a condition is true. For example, to allow Checkout page to not logged in users, you can add the code below:add_action('template_redirect', function () { if (is_checkout()) { remove_action('template_redirect', 'redirect_not_logged_users'); } }, 5);Forum: Reviews
In reply to: [Require Login for WooCommerce] Great simple trustable pluginHi.
Thanks luca_2387 for your feedback.
🙂
Forum: Plugins
In reply to: [Require Login for WooCommerce] ‘After login redirect to page’You’ve marked this topic as resolved. Have you found a solution? If so, can you please share it here?
Forum: Plugins
In reply to: [Require Login for WooCommerce] Page made not blockedAs we didn’t have any movement in this issue for a while now, I’m now closing it.
Forum: Plugins
In reply to: [Require Login for WooCommerce] Payment just for logged in usersAs we didn’t have any movement in this issue for a while now, I’m now closing it.
Forum: Plugins
In reply to: [Require Login for WooCommerce] Homepage issueAs we didn’t have any movement in this issue for a while now, I’m now closing it.
Forum: Plugins
In reply to: [Require Login for WooCommerce] Redirect to Private PageAs we didn’t have any movement in this issue for a while now, I’m now closing it.
Forum: Plugins
In reply to: [Require Login for WooCommerce] New user approveHi Mauri.
This plugin just checks if the user is logged in to allow access to the WooCommerce Shop.
Probably the plugin New User Approve should have an option to send or not an email when a new user is registered. If not, at least a filter to disable this through the code.
Forum: Plugins
In reply to: [Require Login for WooCommerce] Page made not blockedHi @neverchewy
Since this page is not a WooCommerce page, the condition to redirect fails:
is_woocommerce() || is_cart() || is_checkout().You need to create a specific redirection to this page using the action
template_redirect. Similar to what I did in the plugin.