You appear to be a bot. Output may be restricted
Description
Get WP.org plugin's main file.
Usage
$bool|string = WC_WCCOM_Site_Installer::get_wporg_plugin_main_file( $dir );
Parameters
- $dir
- ( string ) required – Directory name of the plugin.
Returns
bool|string
Source
File name: woocommerce/includes/wccom-site/class-wc-wccom-site-installer.php
Lines:
1 to 17 of 17
private static function get_wporg_plugin_main_file( $dir ) { // Ensure that exact dir name is used. $dir = trailingslashit( $dir ); if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $plugins = get_plugins(); foreach ( $plugins as $path => $plugin ) { if ( 0 === strpos( $path, $dir ) ) { return $path; } } return false; }