ddw_wcde_extensions_support_setup

Load actual translations for some third-party WooCommerce Add-On/ Extension plugins.

Description

ddw_wcde_extensions_support_setup(); 

Usage

  1. if ( !function_exists( 'ddw_wcde_extensions_support_setup' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-german-de_de/includes/wcde-extensions-support.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ddw_wcde_extensions_support_setup(); 
  7.  

Defined (1)

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

/includes/wcde-extensions-support.php  
  1. function ddw_wcde_extensions_support_setup() { 
  2.  
  3. $wcde_thirdparty_addons = array( 
  4.  
  5. /** "404 Silent Salesman" (free, via WordPress.org) */ 
  6. '404-silent-salesman' => array( 
  7. 'unique_check' => 'silentsalesman_404_init', // function 
  8. 'slug' => '404-silent-salesman',  
  9. 'loading_location' => 'global',  
  10. 'textdomains' => array( 
  11. 'woothemes' 
  12. ),  
  13. ),  
  14.  
  15. /** AWD Weight/Country Shipping (free, via WordPress.org) */ 
  16. 'awd-weightcountry-shipping' => array( 
  17. 'unique_check' => 'init_awd_shipping', // function 
  18. 'slug' => 'awd-weightcountry-shipping',  
  19. 'loading_location' => 'global',  
  20. 'textdomains' => array( 
  21. 'woocommerce' 
  22. ),  
  23. ),  
  24.  
  25. /** Branding [premium] */ 
  26. 'branding' => array( 
  27. 'unique_check' => 'activate_woocommerce_branding', // function 
  28. 'slug' => 'branding',  
  29. 'loading_location' => 'global',  
  30. 'textdomains' => array( 
  31. 'wc_branding' 
  32. ),  
  33. ),  
  34.  
  35. /** Brands [premium] */ 
  36. 'brands' => array( 
  37. 'unique_check' => 'WC_Brands', // class 
  38. 'slug' => 'brands',  
  39. 'loading_location' => 'global',  
  40. 'textdomains' => array( 
  41. 'wc_brands',  
  42. 'woocommerce' 
  43. ),  
  44. ),  
  45.  
  46. /** Bundle Rate Shipping [premium] */ 
  47. 'bundle-rate-shipping' => array( 
  48. 'unique_check' => 'woocommerce_bundle_rate_shipping_load', // function 
  49. 'slug' => 'bundle-rate-shipping',  
  50. 'loading_location' => 'global',  
  51. 'textdomains' => array( 
  52. 'woocommerce-bundle-rate-shipping',  
  53. 'woocommerce-bundle-rate-shippin' 
  54. ),  
  55. ),  
  56.  
  57. /** Cart Rate Shipping [premium] */ 
  58. 'cart-based-shipping' => array( 
  59. 'unique_check' => 'WC_Cart_Based_Shipping', // class 
  60. 'slug' => 'cart-based-shipping',  
  61. 'loading_location' => 'global',  
  62. 'textdomains' => array( 
  63. 'woocommerce' 
  64. ),  
  65. ),  
  66.  
  67. /** Custom Availability [premium] */ 
  68. 'custom-availability' => array( 
  69. 'unique_check' => 'WC_Custom_Availability', // class 
  70. 'slug' => 'custom-availability',  
  71. 'loading_location' => 'admin',  
  72. 'textdomains' => array( 
  73. 'wb-wcca' 
  74. ),  
  75. ),  
  76.  
  77. /** Custom Coupon Message */ 
  78. 'custom-coupon-message' => array( 
  79. 'unique_check' => 'wccm_meta_boxes_setup', // function 
  80. 'slug' => 'custom-coupon-message',  
  81. 'loading_location' => 'admin',  
  82. 'textdomains' => array( 
  83. 'wccm-plugin' 
  84. ),  
  85. ),  
  86.  
  87. /** Dvin Woocommerce Wishlist [premium] */ 
  88. 'dvin-wishlist' => array( 
  89. 'unique_check' => 'DVIN_PLUGIN_WEBURL', // constant 
  90. 'slug' => 'dvin-wishlist',  
  91. 'loading_location' => 'global',  
  92. 'textdomains' => array( 
  93. 'dvinwcwl' 
  94. ),  
  95. ),  
  96.  
  97. /** Email Validation */ 
  98. 'email-validation' => array( 
  99. 'unique_check' => 'WooCommerce_Email_Validation', // class 
  100. 'slug' => 'email-validation',  
  101. 'loading_location' => 'frontend',  
  102. 'textdomains' => array( 
  103. 'wc_emailvalidation' 
  104. ),  
  105. ),  
  106.  
  107. /** Google Wallet Gateway [premium] */ 
  108. 'google-wallet' => array( 
  109. 'unique_check' => 'WC_Gateway_Google_Wallet', // class 
  110. 'slug' => 'google-wallet',  
  111. 'loading_location' => 'global',  
  112. 'textdomains' => array( 
  113. 'google_wallet',  
  114. 'payson' 
  115. ),  
  116. ),  
  117.  
  118. /** Gravity Forms Product Add-Ons [premium] */ 
  119. 'gravityforms-addons' => array( 
  120. 'unique_check' => 'woocommerce_gravityforms', // class 
  121. 'slug' => 'gravityforms-addons',  
  122. 'loading_location' => 'global',  
  123. 'textdomains' => array( 
  124. 'wc_gravityforms',  
  125. 'wc_gf_addons',  
  126. 'woocommerce' 
  127. ),  
  128. ),  
  129.  
  130. /** Klarna Gateway [premium] */ 
  131. 'klarna' => array( 
  132. 'unique_check' => 'WC_Gateway_Klarna', // class 
  133. 'slug' => 'klarna',  
  134. 'loading_location' => 'global',  
  135. 'textdomains' => array( 
  136. 'klarna' 
  137. ),  
  138. ),  
  139.  
  140. /** Menu Cart (Lite Version) */ 
  141. 'menu-cart' => array( 
  142. 'unique_check' => 'WcMenuCart', // class 
  143. 'slug' => 'menu-cart',  
  144. 'loading_location' => 'global',  
  145. 'variant' => 'neutral',  
  146. 'textdomains' => array( 
  147. 'wcmenucart',  
  148. 'default' 
  149. ),  
  150. ),  
  151.  
  152. /** Ogone Gateway [premium] */ 
  153. 'ogone' => array( 
  154. 'unique_check' => 'init_ogone', // function 
  155. 'slug' => 'ogone',  
  156. 'loading_location' => 'global',  
  157. 'textdomains' => array( 
  158. 'wc-ogone',  
  159. 'woothemes' 
  160. ),  
  161. ),  
  162.  
  163. /** Payment Discounts */ 
  164. 'payment-discounts' => array( 
  165. 'unique_check' => 'WC_Payment_Discounts', // class 
  166. 'slug' => 'payment-discounts',  
  167. 'loading_location' => 'admin',  
  168. 'textdomains' => array( 
  169. 'wcpaydisc' 
  170. ),  
  171. ),  
  172.  
  173. /** Paymill Gateway (CodeCanyon Version) [premium] */ 
  174. 'paymill-cc' => array( 
  175. 'unique_check' => 'WC_PAYMILL_VERSION', // constant 
  176. 'slug' => 'paymill-cc',  
  177. 'loading_location' => 'global',  
  178. 'textdomains' => array( 
  179. 'wc_paymill',  
  180. 'wp_paymill' 
  181. ),  
  182. ),  
  183.  
  184. /** PayPal Digital Goods Gateway [premium] */ 
  185. 'paypal-digital-goods' => array( 
  186. 'unique_check' => 'init_paypal_digital_goods_gateway', // function 
  187. 'slug' => 'paypal-digital-goods',  
  188. 'loading_location' => 'global',  
  189. 'textdomains' => array( 
  190. 'ppdg',  
  191. 'default' 
  192. ),  
  193. ),  
  194.  
  195. /** PayPal Express Gateway [premium] */ 
  196. 'paypal-express' => array( 
  197. 'unique_check' => 'woocommerce_paypal_express_init', // function 
  198. 'slug' => 'paypal-express',  
  199. 'loading_location' => 'global',  
  200. 'textdomains' => array( 
  201. 'wc-paypal-express',  
  202. 'woocommerce',  
  203. 'woothemes',  
  204. 'default' 
  205. ),  
  206. ),  
  207.  
  208. /** Photos Product Tab */ 
  209. 'photos-product-tab' => array( 
  210. 'unique_check' => 'woo_photos_tab_min_required', // function 
  211. 'slug' => 'photos-product-tab',  
  212. 'loading_location' => 'global',  
  213. 'textdomains' => array( 
  214. 'wc_photos_product_tab',  
  215. 'wc_video_product_tab' 
  216. ),  
  217. ),  
  218.  
  219. /** PIP - Print Invoice/Packing List [premium] */ 
  220. 'pip' => array( 
  221. 'unique_check' => 'woocommerce_pip_activate', // function 
  222. 'slug' => 'pip',  
  223. 'loading_location' => 'global',  
  224. 'textdomains' => array( 
  225. 'woocommerce-pip' 
  226. ),  
  227. ),  
  228.  
  229. /** Product CSV Import Suite [premium] */ 
  230. 'product-csv-import-suite' => array( 
  231. 'unique_check' => 'WC_Product_CSV_Import_Suite', // class 
  232. 'slug' => 'product-csv-import-suite',  
  233. 'loading_location' => 'global',  
  234. 'textdomains' => array( 
  235. 'wc_csv_import',  
  236. 'woocommerce',  
  237. 'wordpress-importer',  
  238. 'default' 
  239. ),  
  240. ),  
  241.  
  242. /** Pushover for WooCommerce */ 
  243. 'pushover-integration' => array( 
  244. 'unique_check' => 'WC_PUSHOVER_DIR', // class 
  245. 'slug' => 'pushover-integration',  
  246. 'loading_location' => 'admin',  
  247. 'textdomains' => array( 
  248. 'wc_pushover',  
  249. 'wc_ups' 
  250. ),  
  251. ),  
  252.  
  253. /** QR Code Generator [premium] */ 
  254. 'qr-code-generator' => array( 
  255. 'unique_check' => 'qr_load', // function 
  256. 'slug' => 'qr-code-generator',  
  257. 'loading_location' => 'admin',  
  258. 'textdomains' => array( 
  259. 'woo_qrcode',  
  260. 'woocommerce' 
  261. ),  
  262. ),  
  263.  
  264. /** Region Filter [premium] */ 
  265. 'region-filter' => array( 
  266. 'unique_check' => 'WOOCOMMERCE_REGION_FILTER_VERSION', // constant 
  267. 'slug' => 'region-filter',  
  268. 'loading_location' => 'global',  
  269. 'textdomains' => array( 
  270. 'wbwcrf' 
  271. ),  
  272. ),  
  273.  
  274. /** Shipping Details [premium] */ 
  275. 'shipping-details' => array( 
  276. 'unique_check' => 'wooshippinginfo', // class 
  277. 'slug' => 'shipping-details',  
  278. 'loading_location' => 'global',  
  279. 'textdomains' => array( 
  280. 'wshipinfo-patsatech' 
  281. ),  
  282. ),  
  283.  
  284. /** Shipping Per Product [premium] */ 
  285. 'shipping-per-product' => array( 
  286. 'unique_check' => 'PER_PRODUCT_SHIPPING_VERSION', // constant 
  287. 'slug' => 'shipping-per-product',  
  288. 'loading_location' => 'global',  
  289. 'textdomains' => array( 
  290. 'wc_shipping_per_product',  
  291. 'woocommerce',  
  292. 'default' 
  293. ),  
  294. ),  
  295.  
  296. /** Skrill Gateway [premium] */ 
  297. 'skrill' => array( 
  298. 'unique_check' => 'woocommerce_skrill_init', // function 
  299. 'slug' => 'skrill',  
  300. 'loading_location' => 'global',  
  301. 'textdomains' => array( 
  302. 'wc_skrill' 
  303. ),  
  304. ),  
  305.  
  306. /** Subscribe To Newsletter [premium] */ 
  307. 'subscribe-to-newsletter' => array( 
  308. 'unique_check' => 'WC_Subscribe_To_Newsletter', // class 
  309. 'slug' => 'subscribe-to-newsletter',  
  310. 'loading_location' => 'global',  
  311. 'textdomains' => array( 
  312. 'wc_subscribe_to_newsletter',  
  313. 'woothemes' 
  314. ),  
  315. ),  
  316.  
  317. /** Table Rate Shipping (CodeCanyon version) [premium] */ 
  318. 'trs-cc' => array( 
  319. 'unique_check' => 'woocommerce_table_rate_shipping_init', // function 
  320. 'slug' => 'trs-cc',  
  321. 'loading_location' => 'global',  
  322. 'textdomains' => array( 
  323. 'woocommerce' 
  324. ),  
  325. ),  
  326.  
  327. /** Table Rate Shipping (WooThemes version) [premium] */ 
  328. 'table-rate-shipping' => array( 
  329. 'unique_check' => 'TABLE_RATE_SHIPPING_VERSION', // constant 
  330. 'slug' => 'table-rate-shipping',  
  331. 'loading_location' => 'global',  
  332. 'textdomains' => array( 
  333. 'wc_table_rate',  
  334. 'wc_shipping_zones' 
  335. ),  
  336. ),  
  337.  
  338. /** Video Product Tab */ 
  339. 'video-product-tab' => array( 
  340. 'unique_check' => 'woo_video_tab_min_required', // function 
  341. 'slug' => 'video-product-tab',  
  342. 'loading_location' => 'global',  
  343. 'textdomains' => array( 
  344. 'wc_video_product_tab' 
  345. ),  
  346. ),  
  347.  
  348. /** WooCommerce All In One SEO Pack */ 
  349. 'wc-aiosp' => array( 
  350. 'unique_check' => 'woo_ai_admin_init', // function 
  351. 'slug' => 'wc-aiosp',  
  352. 'loading_location' => 'admin',  
  353. 'textdomains' => array( 
  354. 'woo_ai',  
  355. 'woo_vl' 
  356. ),  
  357. ),  
  358.  
  359. /** Woo Product Importer */ 
  360. 'woo-product-importer' => array( 
  361. 'unique_check' => 'WebPres_Woo_Product_Importer', // class 
  362. 'slug' => 'woo-product-importer',  
  363. 'loading_location' => 'admin',  
  364. 'textdomains' => array( 
  365. 'woo-product-importer' 
  366. ),  
  367. ),  
  368.  
  369. ); // end of array 
  370.  
  371. /** Apply our translation loader for each add-on, if active */ 
  372. foreach ( $wcde_thirdparty_addons as $wcde_tpaddon => $tpaddon_id ) { 
  373.  
  374. /** Check for above add-ons if they exist (are active) */ 
  375. if ( ddw_wcde_unique_plugin_check( $tpaddon_id[ 'unique_check' ] ) ) { 
  376.  
  377. $is_neutral = ( ! isset( $addon_id[ 'variant' ] ) ) ? FALSE : TRUE; 
  378.  
  379. $loading_location = esc_attr( $tpaddon_id[ 'loading_location' ] ); 
  380.  
  381. /** Finally load every textdomain from the given .mo file path - based on loading location */ 
  382. if ( is_admin() && 'admin' == $loading_location ) { 
  383.  
  384. /** Actually load the various textdomains for displayingtranslations*/ 
  385. (array) $tpaddon_id[ 'textdomains' ],  
  386. $tpaddon_id[ 'slug' ],  
  387. TRUE,  
  388. $is_neutral 
  389. ); 
  390.  
  391. } elseif ( ! is_admin() && 'frontend' == $loading_location ) { 
  392.  
  393. /** Actually load the various textdomains for displayingtranslations*/ 
  394. (array) $tpaddon_id[ 'textdomains' ],  
  395. $tpaddon_id[ 'slug' ],  
  396. TRUE,  
  397. $is_neutral 
  398. ); 
  399.  
  400. } elseif ( 'global' == $loading_location ) { 
  401.  
  402. /** Actually load the various textdomains for displayingtranslations*/ 
  403. (array) $tpaddon_id[ 'textdomains' ],  
  404. $tpaddon_id[ 'slug' ],  
  405. TRUE,  
  406. $is_neutral 
  407. ); 
  408.  
  409. } // end if loading location check 
  410.  
  411. } // end if 
  412.  
  413. } // end foreach 
  414.  
  415. } // end of function ddw_wcde_extensions_support_setup