Skip to content

Commit ce5697d

Browse files
committed
Fix for print not working for PHP below 7.0
The dirname() was causing the issue with PHP versions lower then 7.0 due to it's optional 2nd parameter. Fix #105
1 parent 55d86d4 commit ce5697d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

woocommerce-delivery-notes/includes/class-woocommerce-delivery-notes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function init_hooks() {
149149
* Define WC Constants.
150150
*/
151151
private function define_constants() {
152-
self::$plugin_basefile_path = dirname( __FILE__, 2 ) . '/woocommerce-delivery-notes.php';
152+
self::$plugin_basefile_path = dirname( dirname( __FILE__ ) ) . '/woocommerce-delivery-notes.php';
153153
self::$plugin_basefile = plugin_basename( self::$plugin_basefile_path );
154154
self::$plugin_url = plugin_dir_url( self::$plugin_basefile );
155155
self::$plugin_path = trailingslashit( dirname( self::$plugin_basefile_path ) );

0 commit comments

Comments
 (0)