Merge pull request #7061 from justinstern/master
Support gateway objects in the $load_gateways array
This commit is contained in:
commit
3c3fb22fe9
|
@ -96,7 +96,7 @@ class WC_Payment_Gateways {
|
|||
|
||||
// Load gateways in order
|
||||
foreach ( $load_gateways as $gateway ) {
|
||||
$load_gateway = new $gateway();
|
||||
$load_gateway = is_string( $gateway ) ? new $gateway() : $gateway;
|
||||
|
||||
if ( isset( $ordering[ $load_gateway->id ] ) && is_numeric( $ordering[ $load_gateway->id ] ) ) {
|
||||
// Add in position
|
||||
|
|
Loading…
Reference in New Issue