15 1 0 4000 1 https://codeblock.co.za 300 true 0
theme-sticky-logo-alt

payment_gateways()

0 Comments

Framework / CMS

WooCommerce [Version: Since 3.2.0]

Syntax

Typical Usage

Gets the WC_Payment_Gateways class.

Accepted Parameters

none.

Return Value(s)

Gets the WC_Payment_Gateways class.

Examples of payment_gateways()

Example 1

<?php
$user_id = get_current_user_id(); 
$args = array(
    'customer_id'   => $user_id
);

$new_order = wc_create_order($args);
$gateways = WC()->payment_gateways->payment_gateways(); 

$new_order->set_payment_method( $gateways['bacs'] ); 

Was This Helpful?

Previous Post
update_meta_data()
Next Post
set_payment_method()

0 Comments

Leave a Reply