mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Require plugin.php if no get_plugin_data
it is not included automatically by wp
This commit is contained in:
parent
19d2c2528e
commit
577e5c54d2
1 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,10 @@ class FilePathPluginFactory implements FilePathPluginFactoryInterface {
|
|||
);
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'get_plugin_data' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$plugin_data = get_plugin_data( $filePath );
|
||||
if ( empty( $plugin_data ) ) {
|
||||
throw new UnexpectedValueException(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue