Skip to content

Commit

Permalink
Update Plugin.php
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Oct 27, 2023
1 parent f9134d1 commit 21bf60c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Pronamic\WordPress\Pay;

use Composer\InstalledVersions;
use Pronamic\WordPress\Http\Facades\Http;
use Pronamic\WordPress\Money\Money;
use Pronamic\WordPress\Pay\Admin\AdminModule;
Expand Down Expand Up @@ -300,12 +301,11 @@ public function __construct( $args = [] ) {
* Action scheduler.
*
* @link https://actionscheduler.org/
* @link https://github.com/pronamic/wp-pay-core/issues/154
*/
if ( ! \array_key_exists( 'action_scheduler', $args ) ) {
$args['action_scheduler'] = self::$dirname . '/wp-content/plugins/action-scheduler/action-scheduler.php';
}
$action_scheduler_path = InstalledVersions::getInstallPath( 'woocommerce/action-scheduler' );

require_once $args['action_scheduler'];
require_once $action_scheduler_path . '/action-scheduler.php';

/**
* Payment methods.
Expand Down

0 comments on commit 21bf60c

Please sign in to comment.