Merge pull request #7061 from justinstern/master

Support gateway objects in the $load_gateways array
This commit is contained in:
Mike Jolley 2015-01-08 14:08:39 +00:00
commit 3c3fb22fe9
1 changed files with 1 additions and 1 deletions

View File

@ -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