Title: Plugin files breake
Last modified: March 30, 2021

---

# Plugin files breake

 *  Resolved [picadollo](https://wordpress.org/support/users/picadollo/)
 * (@picadollo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/)
 * Hello, I run an Arabic website The plugin was working fine but suddenly the plugin
   files disappear in the admin area, I tried to figure out the problem I found 
   that when I use Arabic as the default language the files(script and stylesheet)
   disappear, but when I use English as the default language everything works fine
   again.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/#post-14263220)
 * Hi,
 * I’ve been trying to replicate this, but so far I’ve not been able to do so. Can
   you elaborate how you switch languages? Is this in the WP Settings > General 
   or somewhere else?
    Which option should I select here? (I tried one with looked
   Arabic to me, but I’m not able to tell if it actually is)
 * Cheers,
    Jeroen
 *  Thread Starter [picadollo](https://wordpress.org/support/users/picadollo/)
 * (@picadollo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/#post-14265468)
 * When I choose Arabic from the main settings like that screenshot[[**screenshot**](https://snipboard.io/vsrJVp.jpg)]
   
   the plugin page be like that [[**Screenshot**](https://snipboard.io/LaHEQl.jpg)]
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/#post-14265516)
 * Hi,
 * Thank you, I believe I’ve found the same language in the settings (excuse the
   ignorance, I’m not familiar with the Arabic character set, very hard to ‘read’
   for me)
 * It does seem to load the stylesheets for me, so there may be something else going
   on at the same time.
    [https://snipboard.io/PjS9Wd.jpg](https://snipboard.io/PjS9Wd.jpg)
 * Could you add the snippet I posted here before to your functions.php file and
   after refreshing the generator page, let me know the results that are in the 
   error log?
    (make sure to remove the snippet right after, as it’ll log the page
   ID of every page that is loaded)
 *     ```
       add_action( 'admin_enqueue_scripts', function() {
       	$current_screen = get_current_screen();
       	error_log( $current_screen->id );
       }, 20 );
       ```
   
 * Let me know!
    Jeroen
 *  Thread Starter [picadollo](https://wordpress.org/support/users/picadollo/)
 * (@picadollo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/#post-14265743)
 * You made if condition `$current_screen = get_current_screen();
 *  if ( in_array( $current_screen->id, array( ‘marketing_page_woocommerce_coupon_generator’,‘
   woocommerce_page_woocommerce_coupon_generator’) ) )`to enqueue scripts and styles
   based on`get_current_screen();`
    and the current screen in Arabic is `pagenow
   = '%d8%a7%d9%84%d8%aa%d8%b3%d9%88%d9%8a%d9%82_page_woocommerce_coupon_generator'`[
   [**screenshot**](https://snipboard.io/tMdzU7.jpg)]
 * so I changed the condition to `if ( in_array( $current_screen->id, array( 'marketing_page_woocommerce_coupon_generator','
   woocommerce_page_woocommerce_coupon_generator','%d8%a7%d9%84%d8%aa%d8%b3%d9%88%
   d9%8a%d9%82_page_woocommerce_coupon_generator' ) ) )`
 * Thanks!
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/#post-14266014)
 * Thank you for the info / results. It is very interesting this is happening..
 * `%d8%a7%d9%84%d8%aa%d8%b3%d9%88%d9%8a%d9%82` seems to [decode](https://www.url-encode-decode.com/)
   to “التسويق” – which Google Translate says is ‘marketing’. This should be the
   page ID/slug, so in theory shouldn’t get translated, will have to check up on
   this in WC Core.
 * Which version of Woo are you running exactly?
 * Cheers,
    Jeroen
    -  This reply was modified 5 years, 2 months ago by [Jeroen Sormani](https://wordpress.org/support/users/sormano/).
 *  Thread Starter [picadollo](https://wordpress.org/support/users/picadollo/)
 * (@picadollo)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/#post-14266046)
 * Yes this code `%d8%a7%d9%84%d8%aa%d8%b3%d9%88%d9%8a%d9%82` is “Marketing” in 
   English which is the page slug.
 * I use Woo 5.1.0
 * Regards,
    Mohamed
 *  Plugin Author [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * (@sormano)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/#post-14268797)
 * Hi Mohamed,
 * I’ve looked into this, and I’m not sure why there’s a translated/encoded part
   in the ID there, so instead I’ve created a different workaround.
    Could you download
   a updated version of the plugin here and give it a try to get another verification
   before releasing: [https://github.com/JeroenSormani/woocommerce-coupon-generator](https://github.com/JeroenSormani/woocommerce-coupon-generator)
 * Thank you,
    Jeroen

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Plugin files breake’ is closed to new replies.

 * ![](https://ps.w.org/coupon-generator-for-woocommerce/assets/icon.svg?rev=1256647)
 * [Coupon Generator for WooCommerce](https://wordpress.org/plugins/coupon-generator-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/coupon-generator-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/coupon-generator-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/coupon-generator-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/coupon-generator-for-woocommerce/reviews/)

## Tags

 * [Arabic](https://wordpress.org/support/topic-tag/arabic/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)

 * 7 replies
 * 3 participants
 * Last reply from: [Jeroen Sormani](https://wordpress.org/support/users/sormano/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/plugin-files-breake/#post-14268797)
 * Status: resolved