Skip to content
Snippets Groups Projects
Verified Commit c90f560d authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

fix: improve compatibility with wp-builder for paid plugins

parent 4b4ba7b8
No related branches found
No related tags found
2 merge requests!3improve into wp-hook and some additional unfinished things,!21.x
......@@ -35,8 +35,9 @@ class LegacyExtension implements Extension {
$plugin_info->set_plugin_url( $plugin->get_url() );
$plugin_info->set_class_name( $config->get( 'plugin_class_name' ) );
// $plugin_info->set_product_id( $this->product_id );
// $plugin_info->set_plugin_shops( $this->plugin_shops );
$plugin_info->set_product_id( $config->get( 'product_id' ) );
$plugin_info->set_plugin_shops( $config->get( 'plugin_shops' ) );
return $plugin_info;
}
......
......@@ -29,7 +29,7 @@ trait HookableParent {
*/
public function get_hookable_instance_by_class_name( $class_name ) {
if ( $this->registry === null ) {
return;
return false;
}
foreach ( $this->registry as $hookable_object ) {
......
......@@ -24,6 +24,6 @@ final class LegacyDriver implements HookDriver {
$info = $this->container->get( \WPDesk_Plugin_Info::class );
$class_name = $info->get_class_name();
$p = new $class_name( $info );
add_action( 'plugins_loaded', [ $p, 'init' ], -45 );
add_action( 'plugins_loaded', [ $p, 'init' ], -50 );
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment