• Hi. I added a Google login button to EDD Register & Login pages using hooks. But it seems a bad UX on Login form because of show three buttons below each other (login, social login & pay buttons).
    Is there any way to hide Payment button in default and show it after user successfull login?
    My Login form Screenshot: https://pasteboard.co/KekRp0X.jpg

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Mihai Joldis

    (@misulicus)

    Hi @mehdi24

    Is that page a normal Download page on the front-end of the website? If so you could hide the normal EDD Purchase button when you edit a download. On the right side of the edit download page look for the “Disable the automatic output of the purchase button” and check that.

    However if you enable that then you would need to output the button by using the Purchase Link short-code below that setting.

    You can install this extension which is free https://easydigitaldownloads.com/downloads/edd-additional-shortcodes/ which gives you a few more short-codes that you can use and then using the Is logged in short-code from this extension output the purchase link to logged in users:

    In the end you would have something like this:
    [edd_is_user_logged_in][purchase_link id="XXX" text="Purchase" style="button" color="blue"][/edd_is_user_logged_in]

    Thread Starter SeyedMahdi Motahhari

    (@mehdi24)

    Dear @misulicus
    Please check my screenshot. It’s Checkout page not download page. I need to hide Purchase button in Login form (not Register form) in Checkout page and show it after user sign in.

    Plugin Contributor Mihai Joldis

    (@misulicus)

    @mehdi24

    In that case you can use the easy-digital-downloads/templates/checkout_cart.php template file to customize every aspect of the checkout page.

    Make sure you copy that file inside your active theme in an edd_templates/ directory to preserve any changes you make to it.

    Thread Starter SeyedMahdi Motahhari

    (@mehdi24)

    Yes but i dont know ho to do it. Purchase button is joint in both Login & Register form in Checkout page. How should hide it just in login page

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Hide payment button before user login’ is closed to new replies.