Skip to content

Commit

Permalink
Change dirname to plugin_dir_path
Browse files Browse the repository at this point in the history
  • Loading branch information
wzul committed Nov 27, 2022
1 parent d72b017 commit d299e3f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions chip-for-givewp.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ public function define() {
}

public function includes() {
$includes_dir = dirname( __FILE__ ) . '/includes';
include $includes_dir . '/class-api.php';
include $includes_dir . '/class-helper.php';
$includes_dir = plugin_dir_path( GWP_CHIP_FILE ) . 'includes/';
include $includes_dir . 'class-api.php';
include $includes_dir . 'class-helper.php';

if ( is_admin() ){
include $includes_dir . '/admin/class-settings.php';
include $includes_dir . '/admin/class-global-settings.php';
include $includes_dir . '/admin/class-metabox-settings.php';
include $includes_dir . '/admin/class-refund-button.php';
include $includes_dir . 'admin/class-settings.php';
include $includes_dir . 'admin/class-global-settings.php';
include $includes_dir . 'admin/class-metabox-settings.php';
include $includes_dir . 'admin/class-refund-button.php';
}

include $includes_dir . '/class-listener.php';
include $includes_dir . '/class-purchase.php';
include $includes_dir . 'class-listener.php';
include $includes_dir . 'class-purchase.php';
}

public function add_filters() {
Expand Down

0 comments on commit d299e3f

Please sign in to comment.