Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #49 from woocommerce/fix/php52-dir-compat
Browse files Browse the repository at this point in the history
Switch `__DIR__` to `dirname( __FILE__)` for PHP 5.2
  • Loading branch information
jom authored Apr 3, 2018
2 parents 1f70dfd + 1d939d4 commit c97bed3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/class-sensei-course-progress.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function __construct ( $file, $version = '1.0.0' ) {
* Include widgets
*/
public function include_widgets() {
include_once( __DIR__ . '/class-sensei-course-progress-widget.php' );
include_once( dirname( __FILE__ ) . '/class-sensei-course-progress-widget.php' );
register_widget( 'Sensei_Course_Progress_Widget' );
}

Expand Down
4 changes: 2 additions & 2 deletions sensei-course-progress.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Functions used by plugins
*/
if ( ! class_exists( 'WooThemes_Sensei_Dependencies' ) ) {
require_once( __DIR__ . '/woo-includes/class-woothemes-sensei-dependencies.php' );
require_once( dirname( __FILE__ ) . '/woo-includes/class-woothemes-sensei-dependencies.php' );
}

/**
Expand All @@ -46,7 +46,7 @@ function is_sensei_active() {

if( is_sensei_active() ) {

require_once( __DIR__ . '/includes/class-sensei-course-progress.php' );
require_once( dirname( __FILE__ ) . '/includes/class-sensei-course-progress.php' );

/**
* Returns the main instance of Sensei_Course_Progress to prevent the need to use globals.
Expand Down

0 comments on commit c97bed3

Please sign in to comment.