PluginProbe
MakeCommerce for WooCommerce / 3.0.2
MakeCommerce for WooCommerce v3.0.2
4.1.0 4.0.8 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.2 All 96 releases
← All changes | includes/autoloader.php +14 -7 trunk3.0.2 View file →
@@ -127,11 +127,11 @@
127 127
128 128 // replace the namespace prefix with the base directory,
129 129 // replace namespace separators with directory separators
130 130 // in the relative class name, append with .php
131 - $file = $base_dir
132 - . strtolower ( str_replace( '\\', '/', $relative_class ) )
133 - . '.php';
131 + $file = strtolower ( $base_dir
132 + . str_replace( '\\', '/', $relative_class )
133 + . '.php' );
134 134
135 135 // if the mapped file exists, require it
136 136 if ( $this->requireFile( $file ) ) {
137 137 // yes, we're done
@@ -139,15 +139,22 @@
139 139 }
140 140
141 141 //No match above. Also try Class name as filename.
142 142 //Example: Shipping.php is in MakeCommerce namespace but not in shipping namespace to avoid MakeCommerce\Shipping\Shipping
143 +
144 +
145 + //echo ($relative_class);
146 + //echo " >>> ";
143 147 $tmpRelativeClass = explode( '\\', $relative_class );
144 148 $tmpRelativeClass = end( $tmpRelativeClass );
149 + //echo($tmpRelativeClass);
150 + //echo "<br><br>";
145 151
146 - $file = $base_dir
147 - . strtolower ( str_replace( '\\', '/', $relative_class )
148 - . "/" . $tmpRelativeClass )
149 - . '.php';
152 +
153 + $file = strtolower ( $base_dir
154 + . str_replace( '\\', '/', $relative_class )
155 + . "/" . $tmpRelativeClass
156 + . '.php' );
150 157
151 158 if ( $this->requireFile( $file ) ) {
152 159 // yes, we're done
153 160 return $file;