• Resolved bigdaddyswag

    (@bigdaddyswag)


    Hello. We have the Affirm payment gateway plugin in place. It adds a “as low as $X/month” text under pricing displays on the product page, category pages, etc. I’m building a custom block on the product page which also shows product prices. The Affirm text is not pulled in though.

    Does anyone know what exactly this plugin looks for so it will jump in and add it’s text with along with an existing product price?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @bigdaddyswag,

    I think the place to look would be in the woocommerce-gateway-affirm.php file around somewhere like line 471.

    Pricing message in Affirm.
    Link to image: https://cld.wthms.co/YJ0yo8

    If I understand what you are doing, you’re recreating a product page with blocks? However you’re getting product prices you should also include the hook/function Affirm is using to then display its “As low as” text. It seems to use the woocommerce_single_product_summary() function for single product pages.

    It uses other public functions/hooks as well if you keep looking further through that file. For example for the message below the cart total…

    Cart total Affirm
    Link to image: https://cld.wthms.co/YzwxBs

    I hope that helps.

    Thread Starter bigdaddyswag

    (@bigdaddyswag)

    Thanks. I have put some code in place but was trying to include that affirm file so I’d have access to the render_affirm_monthly_payment_messaging function. When I include the file, I get class redeclare errors as what I’m doing loads multiple products. But if I change it to include_once, it doesn’t seem to grab the file at all.

    Hi @bigdaddyswag,

    Sorry for the wait on this reply! Are you still having the issue? If so please let us know, and we can get one the the developers to check this for you.

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @bigdaddyswag We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Affirm plugin “as low as” text in custom block’ is closed to new replies.