login-with-google icon indicating copy to clipboard operation
login-with-google copied to clipboard

Doesn't show on WooCommerce login page

Open dealifyhq opened this issue 4 years ago • 5 comments

Hello,

First of all, thanks for building this great plugin! There is a slight issue, when selecting the option: Only show Google One-Tap on the log-in page, it will only show on the log-in page for admins (the wp-login), but not for WooCommerce users. For example, we have our login/registration URL at https://www.dealify.com/my/, but it won't show there, even though the option 'Enable One Tap Login Only on Login Screen' is on.

Could you check/fix where possible? Maybe it would be even better/more scalable to add an option to include pages/URLs where the one-tap should show (include/exclude URLs)?

Thanks again!

dealifyhq avatar Aug 30 '21 15:08 dealifyhq

Hi @dealifyhq,

There is an option to enable one-tap login Sitewide, can you please confirm if you've enabled that option in plugin settings?

ankitrox avatar Aug 30 '21 16:08 ankitrox

Thanks for the quick feedback. No it is not enabled site-wide, only want it on the login/registration page for WooCommerce. Would that be possible to consider adding in a future update? :)

Thanks in advance!

Op ma 30 aug. 2021 18:02 schreef ankitrox @.***>:

Hi @dealifyhq https://github.com/dealifyhq,

There is an option to enable one-tap login Sitewide, can you please confirm if you've enabled that option in plugin settings?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rtCamp/login-with-google/issues/90#issuecomment-908465919, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATJME246GLDKOLBXDCA7CH3T7OTQDANCNFSM5DCDG7TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dealifyhq avatar Aug 30 '21 16:08 dealifyhq

You can try something like this:

  1. Enable one-tap login site-wide. This will add the one tap script and one tap related required markup as per this code.

  2. Add a custom code snippet in theme's functions.php file which will determine if the current page is not WooCommerce Login page, then remove these actions using remove_action. You can get OneTapLogin object to remove action using

use function RtCamp\GoogleLogin\plugin;



plugin()->container()->get( 'one_tap_login' );

Let me know if you need any further assistance.

ankitrox avatar Aug 31 '21 12:08 ankitrox

@abhishekfdd As discussed, we will add a filter to make the one tap login button load on any user defined page. We will add this feature in the plugin.

aviral-mittal avatar Aug 02 '22 08:08 aviral-mittal

@aviral-mittal I checked and it will be better to use solution provided by Ankit in above comment instead of adding a new filter

abhishekfdd avatar Aug 04 '22 18:08 abhishekfdd