• Hi!

    Is there any way to call the available payment methods and their functionality with some kind of php code? I am explaining the situation.

    I have a theme which I use with WPML. Unfortunately, the theme does support WPML but does NOT support Woocommerce Multilingual – bad author logic. The thing is that I have two languages.

    1. English (default);
    2. French (second).

    When I make payments via the EN version, everything goes smoothly;
    When I make payments via the FR version:
    – I reach the /fr/checkout page;
    – I can fill the name and adress fields;
    – The payment methods are missing;
    – The “Agree with terms” checkbox is present and requires a tick;
    – The Place order button is there.

    When I hit it, it turns back and error.”Invalid payment method.” Which is obvious because I didn’t see them, thus not being available to choose one. After the error appears, then the payment methods are shown. And but their functionality is not the same. I think it’s with ajax that when you choose a payment method, the description appears (for example, “Please send your cheque to…”). In my case this is some kind of stuck. You can only choose the available payment methods. And when you choose one, the payment can actually be done. But… it’s so frustrating that the payment methods DO NOT appear before getting the error.

    Is there anybody who has a logical explanation why this happens? With Woocommerce multilingual this error didn’t appear but the author of the theme insisted on removing the plugin. If I find a patch – this will be simply awesome.

    Thank you all guys!

    https://wordpress.org/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mpatzekov

    (@razmzk)

    Just an addition. I was trying something like:

    <div id=”order_review” class=”woocommerce-checkout-review-order”>

    <?php
    if ( ICL_LANGUAGE_CODE==’fr’ ) { echo DO THE MIRACLE HERE; }
    elseif ( ICL_LANGUAGE_CODE==’en’ ) { echo do_action( ‘woocommerce_checkout_order_review’ ); }

    ?>
    </div>

    in form-checkout.php. But I may be completely wrong.

    Thread Starter mpatzekov

    (@razmzk)

    BUMP

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Call payment methods via php code’ is closed to new replies.