wjecf_load_plugin_textdomain

The WooCommerce Extended Coupon Features wjecf load plugin textdomain function.

Description

wjecf_load_plugin_textdomain(); 

Usage

  1. if ( !function_exists( 'wjecf_load_plugin_textdomain' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-extended-coupon-features/woocommerce-jos-autocoupon.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wjecf_load_plugin_textdomain(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-jos-autocoupon.php  
  1. function wjecf_load_plugin_textdomain() { 
  2. $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce' ); 
  3.  
  4. load_textdomain( 'woocommerce-jos-autocoupon', WP_LANG_DIR . '/woocommerce-jos-autocoupon/woocommerce-jos-autocoupon-' . $locale . '.mo' );  
  5. load_plugin_textdomain('woocommerce-jos-autocoupon', false, basename(dirname(__FILE__)) . '/languages/' ); 
  6.  
  7. // //WP-cli for debugging 
  8. // if ( defined( 'WP_CLI' ) && WP_CLI ) { 
  9. // if ( wjecf_optional_include('includes/WJECF_Debug_CLI.php') ) { 
  10. // WP_CLI::add_command( 'wjecf', 'WJECF_Debug_CLI' ); 
  11. // } 
  12. // } 
  13.  
  14. // Only Initiate the plugin if WooCommerce is active 
  15. if ( WJECF_WC::instance()->get_woocommerce_version() == false ) { 
  16. add_action( 'admin_notices', 'wjecf_admin_notice' ); 
  17. function wjecf_admin_notice() { 
  18. $msg = __( 'WooCommerce Extended Coupon Features is disabled because WooCommerce could not be detected.', 'woocommerce-jos-autocoupon' ); 
  19. echo '<div class="error"><p>' . $msg . '</p></div>'; 
  20. } else {  
  21.  
  22. function WJECF_WC() { 
  23. return WJECF_WC::instance(); 
  24. }  
  25.  
  26. function WJECF_Wrap( $object ) { 
  27. return WJECF_WC::instance()->wrap( $object ); 
  28.  
  29. /** 
  30. * Get the instance of WJECF 
  31. * @return WJECF_Controller|WJECF_Pro_Controller The instance of WJECF 
  32. */ 
  33. function WJECF() { 
  34. if ( class_exists( 'WJECF_Pro_Controller' ) ) {  
  35. return WJECF_Pro_Controller::instance(); 
  36. } else { 
  37. return WJECF_Controller::instance(); 
  38.  
  39. /** 
  40. * Get the instance of WJECF_Admin 
  41. * @return WJECF_Admin The instance of WJECF_Admin 
  42. */ 
  43. functionWJECF_ADMIN) { 
  44. return WJECF()->get_plugin('WJECF_Admin'); 
  45.  
  46. $wjecf_extended_coupon_features = WJECF(); 
  47.  
  48. WJECF()->add_plugin('WJECF_Admin'); 
  49. WJECF()->add_plugin('WJECF_Admin_Auto_Upgrade'); 
  50. WJECF()->add_plugin('WJECF_AutoCoupon'); 
  51. WJECF()->add_plugin('WJECF_WPML'); 
  52. if ( WJECF()->is_pro() ) { 
  53. WJECF()->add_plugin('WJECF_Pro_Free_Products'); 
  54. WJECF()->add_plugin('WJECF_Pro_Coupon_Queueing'); 
  55. WJECF()->add_plugin('WJECF_Pro_Product_Filter'); 
  56. WJECF()->add_plugin('WJECF_Pro_Limit_Discount_Quantities'); 
  57. WJECF()->start();