mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Fix the plugin main file path
This commit is contained in:
parent
86cae6ca4a
commit
238ebc0949
2 changed files with 5 additions and 2 deletions
|
@ -32,7 +32,7 @@ return function (
|
|||
$modules = apply_filters( 'woocommerce_paypal_payments_modules', $modules );
|
||||
|
||||
// Initialize plugin.
|
||||
$properties = PluginProperties::new( __FILE__ );
|
||||
$properties = PluginProperties::new( "$root_dir/woocommerce-paypal-payments.php" );
|
||||
$bootstrap = Package::new( $properties );
|
||||
|
||||
foreach ( $modules as $module ) {
|
||||
|
|
|
@ -39,6 +39,9 @@ return array(
|
|||
return $properties->basePath();
|
||||
},
|
||||
'ppcp.path-to-plugin-main-file' => function( ContainerInterface $container ) : string {
|
||||
return $container->get( 'ppcp.path-to-plugin-folder' ) . '/woocommerce-paypal-payments.php';
|
||||
/** @var Properties $properties */
|
||||
$properties = $container->get( Package::PROPERTIES );
|
||||
|
||||
return $properties->pluginMainFile();
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue