• Resolved acephalia

    (@acephalia)


    Hello,

    I am trying to add afterpay to my divi built website and having trouble including the shortcut to display the payment info.

    If I leave the settings out of the box the afterpay info displays right at the top of the page under the header.

    If I follow the instructions and add the shortcode [afterpay_paragraph] then the info gets displayed where I want it to but it also still shows the info at the top of the page and wherever I’ve entered the shortcode. So there are two afterpay texts on the page now.

    If I delete the paragraph text from the afterpay settings ‘Payment Info on Individual Product Pages’section then everything disappears from the page.

    If I uncheck Enable from the afterpay settings ‘Payment Info on Individual Product Pages’section then again everything disappears from the page.

    Basically I want to know how I can stop afterpay from automatically hooking the data on to the page and use a short code instead. As that is what I believe I am supposed to do if I’m not mistaken. But as of ow afterpay is displaying under the default hook no matter what options i choose.

    thank you
    D.

    • This topic was modified 3 years, 9 months ago by acephalia.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Afterpay

    (@afterpayit)

    Hi @acephalia,

    Thank you for your question.

    The Payment Info on Individual Product Pages is by default located under the price, because that appears to be the most suitable place for that message.

    However, there is a temporary workaround for this particular use case. The hook name can be set to a non-existent hook, while leaving the ‘Enable’ on and not deleting the paragraph text. For example, change the hook name from ‘woocommerce_single_product_summary’ to ‘afterpay_removed’. That way, it would ignore the default location and show up only where the shortcode is inserted.

    The engineering team is currently investigating this challenge further, and plans to improve this shortcode feature in the next release of the plugin.

    Thank you.

    Hey Team.

    I am having the same issue I believe so have been asked to move my questions over here.
    I am using a LiteSpeed Server With DIVI Theme. I have tried disabling all other plugins.

    1. In the WooCommerce > Settings > Checkout > Afterpay (Plugin v1.3.1) I cannot see the field to change the AfterPay Hook priority as seen in this support document linked below:
    https://developers.afterpay.com/afterpay-online/docs/woocommerce-hooks

    2. It is not clear to me how to use the AfterPay shortcodes (eg.[afterpay_paragraph])
    Can you link to a document that shows how to implement these as I have so far been unable to get any AfterPay Shortcode to work anywhere on my site.
    Do I need to create hooks for the shortcodes in PHP?
    This document only lists shortcodes used within the settings fields.
    https://developers.afterpay.com/afterpay-online/docs/woocommerce-shortcodes

    Cheers for your time.
    Dean

    Thread Starter acephalia

    (@acephalia)

    It slipped my mind that I asked this question. I figured this one out a few days after I initially posted my question.

    Similar to what was suggested my settings on the afterpay.

    Payment Info on Individual Product Pages is as follows.

    Enable – Checked
    Afterpay Text : (Enter as required)
    Hook : none (you need to type in none here)
    Priority : 15

    After this I just used the shortcode [afterpay_paragraph] within a custom template in themebuilder and assigned it to all products.

    More info on Global templates and themebuilder : https://www.elegantthemes.com/documentation/divi/the-divi-theme-builder/

    Hope this helps.

    • This reply was modified 3 years, 8 months ago by acephalia.

    This is weird, it seems there is two versions of this plugin, both published by AfterPay?

    My Current Plugin
    ——————————————————
    WooCommerce Afterpay Gateway
    Deactivate | Troubleshoot
    Use Afterpay as a credit card processor for WooCommerce.
    Version 1.3.1 | By AfterPay | Visit plugin site
    ——————————————————–

    The plugin we are discussing here:
    ——————————————————
    Afterpay Gateway for WooCommerce
    Activate | Delete
    Provide Afterpay as a payment option for WooCommerce orders.
    Version 2.1.6 | By Afterpay | View details
    ——————————————————

    Any ideas what is happening here? Is mine fake or old?

    Cheers

    • This reply was modified 3 years, 8 months ago by thunk303.
    Thread Starter acephalia

    (@acephalia)

    Not sure I can help you with that. Having said that the easiest solution I can think of is to manually update.

    Download the latest version from : https://wordpress.org/plugins/afterpay-gateway-for-woocommerce/ to your computer.

    After that login into your servers file manager head to the /wp-content/plugins/ folder and then rename the old plugin to Afterpay.old

    Upload the new zip file to /wp-content/plugins/ and unzip.

    Done. This should update you to the latest version.

    Thanks Ace, I am curious if afterpay changed the name of there plugin at some point and listed it as a new item? mHopefully the DEV’s will chime in on this.

    Hey again Ace.

    Ok, we are most of the way there and I really appreciate your help. Just one more issue.

    1. So I manually updated to the newest version of the plugin and now get all of the input fields in the afterpay settings page. Great.

    2. The shortcodes are now working and I can enter it anywhere I need and it works no probs.

    But, even when I remove the hook details from the field for single products the afterpay info still appears at the very top of single product pages?

    To be clear, did you need to do anything other than remove the hook line in single product settings?

    Cheer again

    Thread Starter acephalia

    (@acephalia)

    Hi Dean

    Glad you’ve made some progress.
    The hook field cannot be left blank. You need to enter the word :

    none

    into the field or else it just sets the default hook which is why you are seeing it on the top of the page.

    That should hopefully sort you out.

    You’re a legend Ace, that sorted it, really appreciate your time!

    Hopefully, the Devs will add all this to the Support Docs going forward.

    Cheers again
    Dean

    Plugin Author Afterpay

    (@afterpayit)

    Hi @thunk303,

    Thank you for your message.

    We are glad that the issue has been resolved.

    Regarding the plugin versions:

    • Version 1.3.1 was the latest version of the WooCommerce Afterpay Gateway plugin. This iteration of the plugin was never published on the WordPress SVN.
    • For the purposes of following naming conventions for all WordPress plugins, the Afterpay plugin was renamed to Afterpay Gateway for WooCommerce, and version 2.0.0 was published via the SVN on Friday, 13 July 2018.
    • Due to the different name, there is no prompt to upgrade for versions prior to 2.0.0. The recommended practice is therefore to deactivate and remove the old plugin, then install and activate the new plugin by following the steps documented here: https://developers.afterpay.com/afterpay-online/docs/woocommerce-install-plugin
    • Plugin configuration settings will not be removed when the plugin is uninstalled. It is considered best practice to complete these steps in a staging environment prior to making any changes in the production environment.

    Thank you.

    Thread Starter acephalia

    (@acephalia)

    @afterpayit hopefully you guys will figure out a better integration for this. In the interim I do agree with @thunk303 on adding this to the help page.

    @thunk303 glad you’ve got it all sorted.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Shortcode For Divi Builder Not Working’ is closed to new replies.