Code formatting

This commit is contained in:
Mike Jolley 2016-02-11 13:16:21 +00:00
parent 6d0f844d2b
commit c8ce66f1f1
1 changed files with 3 additions and 4 deletions

View File

@ -230,14 +230,13 @@ class WC_Shipping_Zone implements WC_Data {
// The returned array may contain instances of shipping methods, as well
// as classes. If the "class" is an instance, just use it. If not,
// create an instance.
if( is_object( $class_name ) ) {
if ( is_object( $class_name ) ) {
$methods[ $raw_method->instance_id ] = $class_name;
}
else {
} else {
// If the class is not an object, it should be a string. It's better
// to double check, to be sure (a class must be a string, anything)
// else would be useless
if( is_string( $class_name ) && class_exists( $class_name ) ) {
if ( is_string( $class_name ) && class_exists( $class_name ) ) {
$methods[ $raw_method->instance_id ] = new $class_name( $raw_method->instance_id );
}
}