Title: Call payment methods via php code
Last modified: August 30, 2016

---

# Call payment methods via php code

 *  [mpatzekov](https://wordpress.org/support/users/razmzk/)
 * (@razmzk)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/call-payment-methods-via-php-code/)
 * 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/](https://wordpress.org/plugins/woocommerce/)

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

 *  Thread Starter [mpatzekov](https://wordpress.org/support/users/razmzk/)
 * (@razmzk)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/call-payment-methods-via-php-code/#post-6259918)
 * 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](https://wordpress.org/support/users/razmzk/)
 * (@razmzk)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/call-payment-methods-via-php-code/#post-6260263)
 * BUMP

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

The topic ‘Call payment methods via php code’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [not showing](https://wordpress.org/support/topic-tag/not-showing/)
 * [payment methods](https://wordpress.org/support/topic-tag/payment-methods/)

 * 2 replies
 * 1 participant
 * Last reply from: [mpatzekov](https://wordpress.org/support/users/razmzk/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/call-payment-methods-via-php-code/#post-6260263)
 * Status: not resolved