woocommerce_checkout_payment

Output the Payment Methods on the checkout.

Description

woocommerce_checkout_payment(); 

Usage

  1. if ( !function_exists( 'woocommerce_checkout_payment' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = woocommerce_checkout_payment(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-template-functions.php  
  1. function woocommerce_checkout_payment() { 
  2. if ( WC()->cart->needs_payment() ) { 
  3. $available_gateways = WC()->payment_gateways()->get_available_payment_gateways(); 
  4. WC()->payment_gateways()->set_current_gateway( $available_gateways ); 
  5. } else { 
  6. $available_gateways = array(); 
  7.  
  8. wc_get_template( 'checkout/payment.php', array( 
  9. 'checkout' => WC()->checkout(),  
  10. 'available_gateways' => $available_gateways,  
  11. 'order_button_text' => apply_filters( 'woocommerce_order_button_text', __( 'Place order', woocommerce ) ),  
  12. ) );