| @@ -20,10 +20,11 @@ | ||
| 20 | 20 | add_action( 'admin_enqueue_scripts', [ $this, 'wp_enqueue_scripts' ], 99 ); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | private function get_plugin_url() { |
| 24 | - if ( Helpers::is_yaymail_lite_and_yay_wp_pro_active() ) { | |
| 25 | - return YAYMAIL_WP_PLUGIN_URL; | |
| 24 | + $screen = get_current_screen(); | |
| 25 | + if ( $screen->id !== 'yaycommerce_page_yaymail-settings' && defined( 'YAYWP_PLUGIN_URL' ) ) { | |
| 26 | + return YAYWP_PLUGIN_URL; | |
| 26 | 27 | } |
| 27 | 28 | return YAYMAIL_PLUGIN_URL; |
| 28 | 29 | } |
| 29 | 30 | |
| @@ -144,12 +145,12 @@ | ||
| 144 | 145 | global $wp_filesystem; |
| 145 | 146 | require_once ABSPATH . '/wp-admin/includes/file.php'; |
| 146 | 147 | WP_Filesystem(); |
| 147 | 148 | |
| 148 | - if ( Helpers::is_yaymail_lite_and_yay_wp_pro_active() ) { | |
| 149 | - $plugin_path = YAYMAIL_WP_PLUGIN_PATH; | |
| 150 | - } else { | |
| 151 | - $plugin_path = YAYMAIL_PLUGIN_PATH; | |
| 149 | + $plugin_path = YAYMAIL_PLUGIN_PATH; | |
| 150 | + $screen = get_current_screen(); | |
| 151 | + if ( $screen->id !== 'yaycommerce_page_yaymail-settings' && defined( 'YAYWP_PLUGIN_PATH' ) ) { | |
| 152 | + $plugin_path = YAYWP_PLUGIN_PATH; | |
| 152 | 153 | } |
| 153 | 154 | |
| 154 | 155 | $content = $wp_filesystem->get_contents( $plugin_path . 'assets/dist/yaymail/manifest.json' ); |
| 155 | 156 | |