• Resolved Jairo Ochoa

    (@jairoochoa)


    Hi

    We use this hook to customize the message when no payment method exists.

    woocommerce_no_available_payment_methods_message

    It works fine with [woocommerce_checkout] but since we’ve switched to Gutenberg block it doesn’t work anymore.
    Is there any new hook ?
    Maybe Gutenberg would never support this hook or it’s a temporary issue?

    Many thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Jairo Ochoa,

    Thank you for contacting WooCommerce support.

    I understand you’re asking about using the woocommerce_no_available_payment_methods_message hook with the new Gutenberg checkout block.

    If you’re using the new Checkout block instead of the [woocommerce_checkout] shortcode, the hook you mentioned won’t work as the new block is built differently.

    Could you tell me more about the message that appears when no payment method exists?
    I might be able to suggest an alternate solution.

    Best regards.

    Thread Starter Jairo Ochoa

    (@jairoochoa)

    Hi @doublezed2

    We have developed a Theme Settings were the shop manager can change the message.
    Usually during holidays they disable payments method and the hook shows a message “We are on holidays, we will be back on September 1st”.
    This is more friendly than “There are no payments methods”

    If we use?[woocommerce_checkout] shortcode it works like charm but new block do not support this hook and it would be great if this hook would not be discontinued.

    Reagards

    PD: same for no shipping methods hook in cart and check out

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Jairo Ochoa,

    Thank you for the clarification.

    The new checkout block is built with ReactJS, so the old hooks used with the Checkout shortcode aren’t compatible.

    I recommend consulting a web developer to create code that works with the new checkout.
    You can find experienced WooCommerce developers on Codeable.io and WooExperts.com.

    Please don’t hesitate to contact us again if you have more questions or concerns.
    We are here to help ??

    Best regards.

    Thread Starter Jairo Ochoa

    (@jairoochoa)

    Hi @doublezed2

    We are developers, we have developed many plugins !
    What I cannot understand why the hook does not work even though it uses ReactJS.
    It makes no sense that something useful that WooCommerce supports be removed.

    Regards

    Hi @jairoochoa,

    I understand your concern about the hook not working as expected, despite using ReactJS.

    While we may not be able to fully answer customization questions, I recommend joining our WooCommerce Slack community (it does have a developer channel where you can ask coding questions): https://woo.com/community-slack/

    Hope it gets you going.

    Cheers!

    Thread Starter Jairo Ochoa

    (@jairoochoa)

    Hi @ckadenge

    We are able to get a fix using JS, for instance.
    Or even, the easiest way, using again [woocommerce_checkout]
    My “complaint” is why this hook has been removed.
    Having removed it is step backward.

    Regards

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Jairo Ochoa,

    Thank you for your reply.

    What I cannot understand why the hook does not work even though it uses ReactJS.

    Could you please clarify how the “woocommerce_no_available_payment_methods_message” uses ReactJS?

    My “complaint” is why this hook has been removed.
    Having removed it is step backward.

    To clarify, the hook has not been removed since it is working fine with the Checkout Shortcode.
    It is simply not compatible with the new Checkout Block.
    The new Checkout Block is still evolving and new features are being developed.

    If you like you may submit a feature request at our portal.
    This way your request will be recorded and put in the process.

    Please don’t hesitate to contact us again if you have more questions or concerns.
    We are here to help ??

    Best regards.

    Thread Starter Jairo Ochoa

    (@jairoochoa)

    Hi @doublezed2

    Could you please clarify how the “woocommerce_no_available_payment_methods_message” uses ReactJS?

    From your first reply I understood that the Gutenberg block works with ReactJS and this is the reason why the hook does not work.
    I cannot understand why because the message is not created by ReactJS, it cames from any PHP and the hook can be run in the right moment despite of how the front is created.

    To clarify, the hook has not been removed since it is working fine with the Checkout Shortcode.

    I know. I mean removed from the block or in fact, not yet included.

    Front my point of view blocks cannot be worse than shortcode and should do (at least) the same.

    We could develop a fix with JS enqueuing a 3 lines JS in the footer but it would work only form our shops. It’s a nonsense.

    There are a lot of plugins which add fields or modify the cart and checkout, and many of then do not work with the new blocks. And many users are not aware that the auto-generated pages of cart and checkout now include a block instead of a shortcode. And they wonder why the VAT-ID is not showing in the page (this example told me yesterday a customer which has made a shop)

    regards

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Jairo Ochoa,

    Thank you for sharing your thoughts about the Checkout Block.

    Currently, the only way to address the issue you are experiencing is by implementing custom JS code.
    I suggest you submit a feature request at our portal:
    https://woocommerce.com/document/feature-request-portal/
    This way our request will be recorded and put through the process for future enhancement.

    Please don’t hesitate to contact us again if you have more questions or concerns.
    We are here to help ??

    Best regards.

    Thread Starter Jairo Ochoa

    (@jairoochoa)

    I’ve already posted the request.

    Thanks

    Hi @jairoochoa,

    I’ve already posted the request.

    Glad to hear it – thanks for letting us know!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.