Booster for WooCommerce - Version 1.9.0

Version Description

  • 10/11/2014 =
  • Feature Upgraded - Payment Gateways - Payment Gateways Fees, added. Idea by Daniele. Also made changes to PDF Invoices - fees now displayed in invoice.
  • Feature Upgraded - Product Tabs - Options added for: hiding global tabs for an products and/or categories list. Idea by Gary. Another similar option added: show global tab only for products and/or categories list.
  • Feature Upgraded - Sorting - Sorting products by stock quantity, added. Idea by Fred.
  • Feature Upgraded - PDF Invoices - Emailing PDF as attachment for selected payment methods only option added. Idea by Jen.
  • Feature Upgraded - PDF Invoices - Option to add shipping address to the invoice, added. Idea by Justine.
  • Feature Upgraded - Orders - Order Numbers - Custom order number suffix added. Idea by Patryk.
  • Feature Upgraded - Add to Cart - Changing add to cart button text for products with zero and/or empty price (suggested by Patryk) option added. Products with zero price are covered for archive (category) and single views. Products with empty price only for archives (single view does not contain add to cart button at all, so nothing to cover).
  • Feature Upgraded - Product Info - Added [wcjp_list_attribute] shortcode. Now it is possible to display product's attribute values list (e.g. to list the different colour variations of a product). Idea by Tony. This is the way to display product info, so WooJetpack shortcodes (introduced in v.1.8.2) are depreciated and will be removed in feature releases. Shortcode has visibility parameter which gives the possibility to show shortcode's product info to admin only.
  • Feature Upgraded - Product Info - %stock_quantity% WooJetpack Shortcode added.
  • Dev - Product Info - the_content filter added to result. Now shortcodes will be displayed properly.
  • Tweak - Add to Cart - Removed enable checkboxes in admin settings. Now need to leave the value empty to disable.
  • Tweak - Added some info to Old Slugs, Custom Statuses and Product Tabs features. Suggested by Patryk.
  • New Feature - Reports - Various sales, stock, customers etc. reports. BETA version.
Download this release

Release Info

Developer algoritmika
Plugin Icon 128x128 Booster for WooCommerce
Version 1.9.0
Comparing to
See all releases

Code changes from version 1.8.2 to 1.9.0

Files changed (259) hide show
  1. assets/images/flag-icons/ad.png +0 -0
  2. assets/images/flag-icons/ae.png +0 -0
  3. assets/images/flag-icons/af.png +0 -0
  4. assets/images/flag-icons/ag.png +0 -0
  5. assets/images/flag-icons/ai.png +0 -0
  6. assets/images/flag-icons/al.png +0 -0
  7. assets/images/flag-icons/am.png +0 -0
  8. assets/images/flag-icons/an.png +0 -0
  9. assets/images/flag-icons/ao.png +0 -0
  10. assets/images/flag-icons/ar.png +0 -0
  11. assets/images/flag-icons/as.png +0 -0
  12. assets/images/flag-icons/at.png +0 -0
  13. assets/images/flag-icons/au.png +0 -0
  14. assets/images/flag-icons/aw.png +0 -0
  15. assets/images/flag-icons/ax.png +0 -0
  16. assets/images/flag-icons/az.png +0 -0
  17. assets/images/flag-icons/ba.png +0 -0
  18. assets/images/flag-icons/bb.png +0 -0
  19. assets/images/flag-icons/bd.png +0 -0
  20. assets/images/flag-icons/be.png +0 -0
  21. assets/images/flag-icons/bf.png +0 -0
  22. assets/images/flag-icons/bg.png +0 -0
  23. assets/images/flag-icons/bh.png +0 -0
  24. assets/images/flag-icons/bi.png +0 -0
  25. assets/images/flag-icons/bj.png +0 -0
  26. assets/images/flag-icons/bm.png +0 -0
  27. assets/images/flag-icons/bn.png +0 -0
  28. assets/images/flag-icons/bo.png +0 -0
  29. assets/images/flag-icons/br.png +0 -0
  30. assets/images/flag-icons/bs.png +0 -0
  31. assets/images/flag-icons/bt.png +0 -0
  32. assets/images/flag-icons/bv.png +0 -0
  33. assets/images/flag-icons/bw.png +0 -0
  34. assets/images/flag-icons/by.png +0 -0
  35. assets/images/flag-icons/bz.png +0 -0
  36. assets/images/flag-icons/ca.png +0 -0
  37. assets/images/flag-icons/catalonia.png +0 -0
  38. assets/images/flag-icons/cc.png +0 -0
  39. assets/images/flag-icons/cd.png +0 -0
  40. assets/images/flag-icons/cf.png +0 -0
  41. assets/images/flag-icons/cg.png +0 -0
  42. assets/images/flag-icons/ch.png +0 -0
  43. assets/images/flag-icons/ci.png +0 -0
  44. assets/images/flag-icons/ck.png +0 -0
  45. assets/images/flag-icons/cl.png +0 -0
  46. assets/images/flag-icons/cm.png +0 -0
  47. assets/images/flag-icons/cn.png +0 -0
  48. assets/images/flag-icons/co.png +0 -0
  49. assets/images/flag-icons/cr.png +0 -0
  50. assets/images/flag-icons/cs.png +0 -0
  51. assets/images/flag-icons/cu.png +0 -0
  52. assets/images/flag-icons/cv.png +0 -0
  53. assets/images/flag-icons/cx.png +0 -0
  54. assets/images/flag-icons/cy.png +0 -0
  55. assets/images/flag-icons/cz.png +0 -0
  56. assets/images/flag-icons/de.png +0 -0
  57. assets/images/flag-icons/dj.png +0 -0
  58. assets/images/flag-icons/dk.png +0 -0
  59. assets/images/flag-icons/dm.png +0 -0
  60. assets/images/flag-icons/do.png +0 -0
  61. assets/images/flag-icons/dz.png +0 -0
  62. assets/images/flag-icons/ec.png +0 -0
  63. assets/images/flag-icons/ee.png +0 -0
  64. assets/images/flag-icons/eg.png +0 -0
  65. assets/images/flag-icons/eh.png +0 -0
  66. assets/images/flag-icons/england.png +0 -0
  67. assets/images/flag-icons/er.png +0 -0
  68. assets/images/flag-icons/es.png +0 -0
  69. assets/images/flag-icons/et.png +0 -0
  70. assets/images/flag-icons/eu.png +0 -0
  71. assets/images/flag-icons/fam.png +0 -0
  72. assets/images/flag-icons/fi.png +0 -0
  73. assets/images/flag-icons/fj.png +0 -0
  74. assets/images/flag-icons/fk.png +0 -0
  75. assets/images/flag-icons/fm.png +0 -0
  76. assets/images/flag-icons/fo.png +0 -0
  77. assets/images/flag-icons/fr.png +0 -0
  78. assets/images/flag-icons/ga.png +0 -0
  79. assets/images/flag-icons/gb.png +0 -0
  80. assets/images/flag-icons/gd.png +0 -0
  81. assets/images/flag-icons/ge.png +0 -0
  82. assets/images/flag-icons/gf.png +0 -0
  83. assets/images/flag-icons/gh.png +0 -0
  84. assets/images/flag-icons/gi.png +0 -0
  85. assets/images/flag-icons/gl.png +0 -0
  86. assets/images/flag-icons/gm.png +0 -0
  87. assets/images/flag-icons/gn.png +0 -0
  88. assets/images/flag-icons/gp.png +0 -0
  89. assets/images/flag-icons/gq.png +0 -0
  90. assets/images/flag-icons/gr.png +0 -0
  91. assets/images/flag-icons/gs.png +0 -0
  92. assets/images/flag-icons/gt.png +0 -0
  93. assets/images/flag-icons/gu.png +0 -0
  94. assets/images/flag-icons/gw.png +0 -0
  95. assets/images/flag-icons/gy.png +0 -0
  96. assets/images/flag-icons/hk.png +0 -0
  97. assets/images/flag-icons/hm.png +0 -0
  98. assets/images/flag-icons/hn.png +0 -0
  99. assets/images/flag-icons/hr.png +0 -0
  100. assets/images/flag-icons/ht.png +0 -0
  101. assets/images/flag-icons/hu.png +0 -0
  102. assets/images/flag-icons/id.png +0 -0
  103. assets/images/flag-icons/ie.png +0 -0
  104. assets/images/flag-icons/il.png +0 -0
  105. assets/images/flag-icons/in.png +0 -0
  106. assets/images/flag-icons/io.png +0 -0
  107. assets/images/flag-icons/iq.png +0 -0
  108. assets/images/flag-icons/ir.png +0 -0
  109. assets/images/flag-icons/is.png +0 -0
  110. assets/images/flag-icons/it.png +0 -0
  111. assets/images/flag-icons/jm.png +0 -0
  112. assets/images/flag-icons/jo.png +0 -0
  113. assets/images/flag-icons/jp.png +0 -0
  114. assets/images/flag-icons/ke.png +0 -0
  115. assets/images/flag-icons/kg.png +0 -0
  116. assets/images/flag-icons/kh.png +0 -0
  117. assets/images/flag-icons/ki.png +0 -0
  118. assets/images/flag-icons/km.png +0 -0
  119. assets/images/flag-icons/kn.png +0 -0
  120. assets/images/flag-icons/kp.png +0 -0
  121. assets/images/flag-icons/kr.png +0 -0
  122. assets/images/flag-icons/kw.png +0 -0
  123. assets/images/flag-icons/ky.png +0 -0
  124. assets/images/flag-icons/kz.png +0 -0
  125. assets/images/flag-icons/la.png +0 -0
  126. assets/images/flag-icons/lb.png +0 -0
  127. assets/images/flag-icons/lc.png +0 -0
  128. assets/images/flag-icons/li.png +0 -0
  129. assets/images/flag-icons/lk.png +0 -0
  130. assets/images/flag-icons/lr.png +0 -0
  131. assets/images/flag-icons/ls.png +0 -0
  132. assets/images/flag-icons/lt.png +0 -0
  133. assets/images/flag-icons/lu.png +0 -0
  134. assets/images/flag-icons/lv.png +0 -0
  135. assets/images/flag-icons/ly.png +0 -0
  136. assets/images/flag-icons/ma.png +0 -0
  137. assets/images/flag-icons/mc.png +0 -0
  138. assets/images/flag-icons/md.png +0 -0
  139. assets/images/flag-icons/me.png +0 -0
  140. assets/images/flag-icons/mg.png +0 -0
  141. assets/images/flag-icons/mh.png +0 -0
  142. assets/images/flag-icons/mk.png +0 -0
  143. assets/images/flag-icons/ml.png +0 -0
  144. assets/images/flag-icons/mm.png +0 -0
  145. assets/images/flag-icons/mn.png +0 -0
  146. assets/images/flag-icons/mo.png +0 -0
  147. assets/images/flag-icons/mp.png +0 -0
  148. assets/images/flag-icons/mq.png +0 -0
  149. assets/images/flag-icons/mr.png +0 -0
  150. assets/images/flag-icons/ms.png +0 -0
  151. assets/images/flag-icons/mt.png +0 -0
  152. assets/images/flag-icons/mu.png +0 -0
  153. assets/images/flag-icons/mv.png +0 -0
  154. assets/images/flag-icons/mw.png +0 -0
  155. assets/images/flag-icons/mx.png +0 -0
  156. assets/images/flag-icons/my.png +0 -0
  157. assets/images/flag-icons/mz.png +0 -0
  158. assets/images/flag-icons/na.png +0 -0
  159. assets/images/flag-icons/nc.png +0 -0
  160. assets/images/flag-icons/ne.png +0 -0
  161. assets/images/flag-icons/nf.png +0 -0
  162. assets/images/flag-icons/ng.png +0 -0
  163. assets/images/flag-icons/ni.png +0 -0
  164. assets/images/flag-icons/nl.png +0 -0
  165. assets/images/flag-icons/no.png +0 -0
  166. assets/images/flag-icons/np.png +0 -0
  167. assets/images/flag-icons/nr.png +0 -0
  168. assets/images/flag-icons/nu.png +0 -0
  169. assets/images/flag-icons/nz.png +0 -0
  170. assets/images/flag-icons/om.png +0 -0
  171. assets/images/flag-icons/pa.png +0 -0
  172. assets/images/flag-icons/pe.png +0 -0
  173. assets/images/flag-icons/pf.png +0 -0
  174. assets/images/flag-icons/pg.png +0 -0
  175. assets/images/flag-icons/ph.png +0 -0
  176. assets/images/flag-icons/pk.png +0 -0
  177. assets/images/flag-icons/pl.png +0 -0
  178. assets/images/flag-icons/pm.png +0 -0
  179. assets/images/flag-icons/pn.png +0 -0
  180. assets/images/flag-icons/pr.png +0 -0
  181. assets/images/flag-icons/ps.png +0 -0
  182. assets/images/flag-icons/pt.png +0 -0
  183. assets/images/flag-icons/pw.png +0 -0
  184. assets/images/flag-icons/py.png +0 -0
  185. assets/images/flag-icons/qa.png +0 -0
  186. assets/images/flag-icons/re.png +0 -0
  187. assets/images/flag-icons/ro.png +0 -0
  188. assets/images/flag-icons/rs.png +0 -0
  189. assets/images/flag-icons/ru.png +0 -0
  190. assets/images/flag-icons/rw.png +0 -0
  191. assets/images/flag-icons/sa.png +0 -0
  192. assets/images/flag-icons/sb.png +0 -0
  193. assets/images/flag-icons/sc.png +0 -0
  194. assets/images/flag-icons/scotland.png +0 -0
  195. assets/images/flag-icons/sd.png +0 -0
  196. assets/images/flag-icons/se.png +0 -0
  197. assets/images/flag-icons/sg.png +0 -0
  198. assets/images/flag-icons/sh.png +0 -0
  199. assets/images/flag-icons/si.png +0 -0
  200. assets/images/flag-icons/sj.png +0 -0
  201. assets/images/flag-icons/sk.png +0 -0
  202. assets/images/flag-icons/sl.png +0 -0
  203. assets/images/flag-icons/sm.png +0 -0
  204. assets/images/flag-icons/sn.png +0 -0
  205. assets/images/flag-icons/so.png +0 -0
  206. assets/images/flag-icons/sr.png +0 -0
  207. assets/images/flag-icons/st.png +0 -0
  208. assets/images/flag-icons/sv.png +0 -0
  209. assets/images/flag-icons/sy.png +0 -0
  210. assets/images/flag-icons/sz.png +0 -0
  211. assets/images/flag-icons/tc.png +0 -0
  212. assets/images/flag-icons/td.png +0 -0
  213. assets/images/flag-icons/tf.png +0 -0
  214. assets/images/flag-icons/tg.png +0 -0
  215. assets/images/flag-icons/th.png +0 -0
  216. assets/images/flag-icons/tj.png +0 -0
  217. assets/images/flag-icons/tk.png +0 -0
  218. assets/images/flag-icons/tl.png +0 -0
  219. assets/images/flag-icons/tm.png +0 -0
  220. assets/images/flag-icons/tn.png +0 -0
  221. assets/images/flag-icons/to.png +0 -0
  222. assets/images/flag-icons/tr.png +0 -0
  223. assets/images/flag-icons/tt.png +0 -0
  224. assets/images/flag-icons/tv.png +0 -0
  225. assets/images/flag-icons/tw.png +0 -0
  226. assets/images/flag-icons/tz.png +0 -0
  227. assets/images/flag-icons/ua.png +0 -0
  228. assets/images/flag-icons/ug.png +0 -0
  229. assets/images/flag-icons/um.png +0 -0
  230. assets/images/flag-icons/us.png +0 -0
  231. assets/images/flag-icons/uy.png +0 -0
  232. assets/images/flag-icons/uz.png +0 -0
  233. assets/images/flag-icons/va.png +0 -0
  234. assets/images/flag-icons/vc.png +0 -0
  235. assets/images/flag-icons/ve.png +0 -0
  236. assets/images/flag-icons/vg.png +0 -0
  237. assets/images/flag-icons/vi.png +0 -0
  238. assets/images/flag-icons/vn.png +0 -0
  239. assets/images/flag-icons/vu.png +0 -0
  240. assets/images/flag-icons/wales.png +0 -0
  241. assets/images/flag-icons/wf.png +0 -0
  242. assets/images/flag-icons/ws.png +0 -0
  243. assets/images/flag-icons/ye.png +0 -0
  244. assets/images/flag-icons/yt.png +0 -0
  245. assets/images/flag-icons/za.png +0 -0
  246. assets/images/flag-icons/zm.png +0 -0
  247. assets/images/flag-icons/zw.png +0 -0
  248. includes/class-wcj-add-to-cart.php +80 -23
  249. includes/class-wcj-old-slugs.php +3 -3
  250. includes/class-wcj-orders.php +16 -4
  251. includes/class-wcj-payment-gateways.php +193 -15
  252. includes/class-wcj-pdf-invoices.php +27 -5
  253. includes/class-wcj-product-info.php +35 -5
  254. includes/class-wcj-product-tabs.php +98 -3
  255. includes/class-wcj-reports.php +148 -36
  256. includes/class-wcj-sorting.php +81 -62
  257. includes/js/checkout.js +8 -0
  258. readme.txt +60 -29
  259. woocommerce-jetpack.php +2 -2
assets/images/flag-icons/ad.png ADDED
Binary file
assets/images/flag-icons/ae.png ADDED
Binary file
assets/images/flag-icons/af.png ADDED
Binary file
assets/images/flag-icons/ag.png ADDED
Binary file
assets/images/flag-icons/ai.png ADDED
Binary file
assets/images/flag-icons/al.png ADDED
Binary file
assets/images/flag-icons/am.png ADDED
Binary file
assets/images/flag-icons/an.png ADDED
Binary file
assets/images/flag-icons/ao.png ADDED
Binary file
assets/images/flag-icons/ar.png ADDED
Binary file
assets/images/flag-icons/as.png ADDED
Binary file
assets/images/flag-icons/at.png ADDED
Binary file
assets/images/flag-icons/au.png ADDED
Binary file
assets/images/flag-icons/aw.png ADDED
Binary file
assets/images/flag-icons/ax.png ADDED
Binary file
assets/images/flag-icons/az.png ADDED
Binary file
assets/images/flag-icons/ba.png ADDED
Binary file
assets/images/flag-icons/bb.png ADDED
Binary file
assets/images/flag-icons/bd.png ADDED
Binary file
assets/images/flag-icons/be.png ADDED
Binary file
assets/images/flag-icons/bf.png ADDED
Binary file
assets/images/flag-icons/bg.png ADDED
Binary file
assets/images/flag-icons/bh.png ADDED
Binary file
assets/images/flag-icons/bi.png ADDED
Binary file
assets/images/flag-icons/bj.png ADDED
Binary file
assets/images/flag-icons/bm.png ADDED
Binary file
assets/images/flag-icons/bn.png ADDED
Binary file
assets/images/flag-icons/bo.png ADDED
Binary file
assets/images/flag-icons/br.png ADDED
Binary file
assets/images/flag-icons/bs.png ADDED
Binary file
assets/images/flag-icons/bt.png ADDED
Binary file
assets/images/flag-icons/bv.png ADDED
Binary file
assets/images/flag-icons/bw.png ADDED
Binary file
assets/images/flag-icons/by.png ADDED
Binary file
assets/images/flag-icons/bz.png ADDED
Binary file
assets/images/flag-icons/ca.png ADDED
Binary file
assets/images/flag-icons/catalonia.png ADDED
Binary file
assets/images/flag-icons/cc.png ADDED
Binary file
assets/images/flag-icons/cd.png ADDED
Binary file
assets/images/flag-icons/cf.png ADDED
Binary file
assets/images/flag-icons/cg.png ADDED
Binary file
assets/images/flag-icons/ch.png ADDED
Binary file
assets/images/flag-icons/ci.png ADDED
Binary file
assets/images/flag-icons/ck.png ADDED
Binary file
assets/images/flag-icons/cl.png ADDED
Binary file
assets/images/flag-icons/cm.png ADDED
Binary file
assets/images/flag-icons/cn.png ADDED
Binary file
assets/images/flag-icons/co.png ADDED
Binary file
assets/images/flag-icons/cr.png ADDED
Binary file
assets/images/flag-icons/cs.png ADDED
Binary file
assets/images/flag-icons/cu.png ADDED
Binary file
assets/images/flag-icons/cv.png ADDED
Binary file
assets/images/flag-icons/cx.png ADDED
Binary file
assets/images/flag-icons/cy.png ADDED
Binary file
assets/images/flag-icons/cz.png ADDED
Binary file
assets/images/flag-icons/de.png ADDED
Binary file
assets/images/flag-icons/dj.png ADDED
Binary file
assets/images/flag-icons/dk.png ADDED
Binary file
assets/images/flag-icons/dm.png ADDED
Binary file
assets/images/flag-icons/do.png ADDED
Binary file
assets/images/flag-icons/dz.png ADDED
Binary file
assets/images/flag-icons/ec.png ADDED
Binary file
assets/images/flag-icons/ee.png ADDED
Binary file
assets/images/flag-icons/eg.png ADDED
Binary file
assets/images/flag-icons/eh.png ADDED
Binary file
assets/images/flag-icons/england.png ADDED
Binary file
assets/images/flag-icons/er.png ADDED
Binary file
assets/images/flag-icons/es.png ADDED
Binary file
assets/images/flag-icons/et.png ADDED
Binary file
assets/images/flag-icons/eu.png ADDED
Binary file
assets/images/flag-icons/fam.png ADDED
Binary file
assets/images/flag-icons/fi.png ADDED
Binary file
assets/images/flag-icons/fj.png ADDED
Binary file
assets/images/flag-icons/fk.png ADDED
Binary file
assets/images/flag-icons/fm.png ADDED
Binary file
assets/images/flag-icons/fo.png ADDED
Binary file
assets/images/flag-icons/fr.png ADDED
Binary file
assets/images/flag-icons/ga.png ADDED
Binary file
assets/images/flag-icons/gb.png ADDED
Binary file
assets/images/flag-icons/gd.png ADDED
Binary file
assets/images/flag-icons/ge.png ADDED
Binary file
assets/images/flag-icons/gf.png ADDED
Binary file
assets/images/flag-icons/gh.png ADDED
Binary file
assets/images/flag-icons/gi.png ADDED
Binary file
assets/images/flag-icons/gl.png ADDED
Binary file
assets/images/flag-icons/gm.png ADDED
Binary file
assets/images/flag-icons/gn.png ADDED
Binary file
assets/images/flag-icons/gp.png ADDED
Binary file
assets/images/flag-icons/gq.png ADDED
Binary file
assets/images/flag-icons/gr.png ADDED
Binary file
assets/images/flag-icons/gs.png ADDED
Binary file
assets/images/flag-icons/gt.png ADDED
Binary file
assets/images/flag-icons/gu.png ADDED
Binary file
assets/images/flag-icons/gw.png ADDED
Binary file
assets/images/flag-icons/gy.png ADDED
Binary file
assets/images/flag-icons/hk.png ADDED
Binary file
assets/images/flag-icons/hm.png ADDED
Binary file
assets/images/flag-icons/hn.png ADDED
Binary file
assets/images/flag-icons/hr.png ADDED
Binary file
assets/images/flag-icons/ht.png ADDED
Binary file
assets/images/flag-icons/hu.png ADDED
Binary file
assets/images/flag-icons/id.png ADDED
Binary file
assets/images/flag-icons/ie.png ADDED
Binary file
assets/images/flag-icons/il.png ADDED
Binary file
assets/images/flag-icons/in.png ADDED
Binary file
assets/images/flag-icons/io.png ADDED
Binary file
assets/images/flag-icons/iq.png ADDED
Binary file
assets/images/flag-icons/ir.png ADDED
Binary file
assets/images/flag-icons/is.png ADDED
Binary file
assets/images/flag-icons/it.png ADDED
Binary file
assets/images/flag-icons/jm.png ADDED
Binary file
assets/images/flag-icons/jo.png ADDED
Binary file
assets/images/flag-icons/jp.png ADDED
Binary file
assets/images/flag-icons/ke.png ADDED
Binary file
assets/images/flag-icons/kg.png ADDED
Binary file
assets/images/flag-icons/kh.png ADDED
Binary file
assets/images/flag-icons/ki.png ADDED
Binary file
assets/images/flag-icons/km.png ADDED
Binary file
assets/images/flag-icons/kn.png ADDED
Binary file
assets/images/flag-icons/kp.png ADDED
Binary file
assets/images/flag-icons/kr.png ADDED
Binary file
assets/images/flag-icons/kw.png ADDED
Binary file
assets/images/flag-icons/ky.png ADDED
Binary file
assets/images/flag-icons/kz.png ADDED
Binary file
assets/images/flag-icons/la.png ADDED
Binary file
assets/images/flag-icons/lb.png ADDED
Binary file
assets/images/flag-icons/lc.png ADDED
Binary file
assets/images/flag-icons/li.png ADDED
Binary file
assets/images/flag-icons/lk.png ADDED
Binary file
assets/images/flag-icons/lr.png ADDED
Binary file
assets/images/flag-icons/ls.png ADDED
Binary file
assets/images/flag-icons/lt.png ADDED
Binary file
assets/images/flag-icons/lu.png ADDED
Binary file
assets/images/flag-icons/lv.png ADDED
Binary file
assets/images/flag-icons/ly.png ADDED
Binary file
assets/images/flag-icons/ma.png ADDED
Binary file
assets/images/flag-icons/mc.png ADDED
Binary file
assets/images/flag-icons/md.png ADDED
Binary file
assets/images/flag-icons/me.png ADDED
Binary file
assets/images/flag-icons/mg.png ADDED
Binary file
assets/images/flag-icons/mh.png ADDED
Binary file
assets/images/flag-icons/mk.png ADDED
Binary file
assets/images/flag-icons/ml.png ADDED
Binary file
assets/images/flag-icons/mm.png ADDED
Binary file
assets/images/flag-icons/mn.png ADDED
Binary file
assets/images/flag-icons/mo.png ADDED
Binary file
assets/images/flag-icons/mp.png ADDED
Binary file
assets/images/flag-icons/mq.png ADDED
Binary file
assets/images/flag-icons/mr.png ADDED
Binary file
assets/images/flag-icons/ms.png ADDED
Binary file
assets/images/flag-icons/mt.png ADDED
Binary file
assets/images/flag-icons/mu.png ADDED
Binary file
assets/images/flag-icons/mv.png ADDED
Binary file
assets/images/flag-icons/mw.png ADDED
Binary file
assets/images/flag-icons/mx.png ADDED
Binary file
assets/images/flag-icons/my.png ADDED
Binary file
assets/images/flag-icons/mz.png ADDED
Binary file
assets/images/flag-icons/na.png ADDED
Binary file
assets/images/flag-icons/nc.png ADDED
Binary file
assets/images/flag-icons/ne.png ADDED
Binary file
assets/images/flag-icons/nf.png ADDED
Binary file
assets/images/flag-icons/ng.png ADDED
Binary file
assets/images/flag-icons/ni.png ADDED
Binary file
assets/images/flag-icons/nl.png ADDED
Binary file
assets/images/flag-icons/no.png ADDED
Binary file
assets/images/flag-icons/np.png ADDED
Binary file
assets/images/flag-icons/nr.png ADDED
Binary file
assets/images/flag-icons/nu.png ADDED
Binary file
assets/images/flag-icons/nz.png ADDED
Binary file
assets/images/flag-icons/om.png ADDED
Binary file
assets/images/flag-icons/pa.png ADDED
Binary file
assets/images/flag-icons/pe.png ADDED
Binary file
assets/images/flag-icons/pf.png ADDED
Binary file
assets/images/flag-icons/pg.png ADDED
Binary file
assets/images/flag-icons/ph.png ADDED
Binary file
assets/images/flag-icons/pk.png ADDED
Binary file
assets/images/flag-icons/pl.png ADDED
Binary file
assets/images/flag-icons/pm.png ADDED
Binary file
assets/images/flag-icons/pn.png ADDED
Binary file
assets/images/flag-icons/pr.png ADDED
Binary file
assets/images/flag-icons/ps.png ADDED
Binary file
assets/images/flag-icons/pt.png ADDED
Binary file
assets/images/flag-icons/pw.png ADDED
Binary file
assets/images/flag-icons/py.png ADDED
Binary file
assets/images/flag-icons/qa.png ADDED
Binary file
assets/images/flag-icons/re.png ADDED
Binary file
assets/images/flag-icons/ro.png ADDED
Binary file
assets/images/flag-icons/rs.png ADDED
Binary file
assets/images/flag-icons/ru.png ADDED
Binary file
assets/images/flag-icons/rw.png ADDED
Binary file
assets/images/flag-icons/sa.png ADDED
Binary file
assets/images/flag-icons/sb.png ADDED
Binary file
assets/images/flag-icons/sc.png ADDED
Binary file
assets/images/flag-icons/scotland.png ADDED
Binary file
assets/images/flag-icons/sd.png ADDED
Binary file
assets/images/flag-icons/se.png ADDED
Binary file
assets/images/flag-icons/sg.png ADDED
Binary file
assets/images/flag-icons/sh.png ADDED
Binary file
assets/images/flag-icons/si.png ADDED
Binary file
assets/images/flag-icons/sj.png ADDED
Binary file
assets/images/flag-icons/sk.png ADDED
Binary file
assets/images/flag-icons/sl.png ADDED
Binary file
assets/images/flag-icons/sm.png ADDED
Binary file
assets/images/flag-icons/sn.png ADDED
Binary file
assets/images/flag-icons/so.png ADDED
Binary file
assets/images/flag-icons/sr.png ADDED
Binary file
assets/images/flag-icons/st.png ADDED
Binary file
assets/images/flag-icons/sv.png ADDED
Binary file
assets/images/flag-icons/sy.png ADDED
Binary file
assets/images/flag-icons/sz.png ADDED
Binary file
assets/images/flag-icons/tc.png ADDED
Binary file
assets/images/flag-icons/td.png ADDED
Binary file
assets/images/flag-icons/tf.png ADDED
Binary file
assets/images/flag-icons/tg.png ADDED
Binary file
assets/images/flag-icons/th.png ADDED
Binary file
assets/images/flag-icons/tj.png ADDED
Binary file
assets/images/flag-icons/tk.png ADDED
Binary file
assets/images/flag-icons/tl.png ADDED
Binary file
assets/images/flag-icons/tm.png ADDED
Binary file
assets/images/flag-icons/tn.png ADDED
Binary file
assets/images/flag-icons/to.png ADDED
Binary file
assets/images/flag-icons/tr.png ADDED
Binary file
assets/images/flag-icons/tt.png ADDED
Binary file
assets/images/flag-icons/tv.png ADDED
Binary file
assets/images/flag-icons/tw.png ADDED
Binary file
assets/images/flag-icons/tz.png ADDED
Binary file
assets/images/flag-icons/ua.png ADDED
Binary file
assets/images/flag-icons/ug.png ADDED
Binary file
assets/images/flag-icons/um.png ADDED
Binary file
assets/images/flag-icons/us.png ADDED
Binary file
assets/images/flag-icons/uy.png ADDED
Binary file
assets/images/flag-icons/uz.png ADDED
Binary file
assets/images/flag-icons/va.png ADDED
Binary file
assets/images/flag-icons/vc.png ADDED
Binary file
assets/images/flag-icons/ve.png ADDED
Binary file
assets/images/flag-icons/vg.png ADDED
Binary file
assets/images/flag-icons/vi.png ADDED
Binary file
assets/images/flag-icons/vn.png ADDED
Binary file
assets/images/flag-icons/vu.png ADDED
Binary file
assets/images/flag-icons/wales.png ADDED
Binary file
assets/images/flag-icons/wf.png ADDED
Binary file
assets/images/flag-icons/ws.png ADDED
Binary file
assets/images/flag-icons/ye.png ADDED
Binary file
assets/images/flag-icons/yt.png ADDED
Binary file
assets/images/flag-icons/za.png ADDED
Binary file
assets/images/flag-icons/zm.png ADDED
Binary file
assets/images/flag-icons/zw.png ADDED
Binary file
includes/class-wcj-add-to-cart.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Add to cart class.
6
  *
7
  * @class WCJ_Add_to_cart
8
- * @version 1.0.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
@@ -99,6 +99,9 @@ class WCJ_Add_to_cart {
99
 
100
  global $woocommerce, $product;
101
 
 
 
 
102
  $product_type = $product->product_type;
103
 
104
  if ( ! in_array( $product_type, array( 'external', 'grouped', 'simple', 'variable' ) ) )
@@ -108,23 +111,30 @@ class WCJ_Add_to_cart {
108
  if ( current_filter() == 'woocommerce_product_single_add_to_cart_text' ) $single_or_archive = 'single';
109
  else if ( current_filter() == 'woocommerce_product_add_to_cart_text' ) $single_or_archive = 'archives';
110
 
111
- if ( $single_or_archive !== '' ) {
112
 
113
- if ( get_option( 'wcj_add_to_cart_text_enabled_on_' . $single_or_archive . '_in_cart_' . $product_type ) == 'yes' ) {
114
-
115
- foreach( $woocommerce->cart->get_cart() as $cart_item_key => $values ) {
116
-
117
- $_product = $values['data'];
118
-
119
- if( get_the_ID() == $_product->id ) {
120
-
121
  return get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_in_cart_' . $product_type );
122
- }
123
  }
124
  }
125
 
126
- if ( get_option( 'wcj_add_to_cart_text_enabled_on_' . $single_or_archive . '_' . $product_type ) == 'yes' ) return get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_' . $product_type );
127
- else return $add_to_cart_text;
 
 
 
 
 
 
 
 
 
 
 
128
  }
129
 
130
  // Default
@@ -224,31 +234,35 @@ class WCJ_Add_to_cart {
224
  array(
225
  'title' => $group_by_product_type['title'],
226
  'id' => 'wcj_add_to_cart_text_on_single_' . $group_by_product_type['id'],
 
 
227
  'default' => $group_by_product_type['default'],
228
  'type' => 'text',
229
  'css' => 'width:30%;min-width:300px;',
230
  );
231
 
232
- $settings[] =
233
  array(
234
  'title' => '',//$group_by_product_type['title'],
235
  'desc' => __( 'Enable on single product pages', 'woocommerce-jetpack' ),
236
  'id' => 'wcj_add_to_cart_text_enabled_on_single_' . $group_by_product_type['id'],
237
  'default' => 'yes',
238
  'type' => 'checkbox',
239
- );
240
 
241
  $settings[] =
242
  array(
243
  'title' => '',//$group_by_product_type['title'],
244
  'id' => 'wcj_add_to_cart_text_on_archives_' . $group_by_product_type['id'],
 
 
245
  'default' => $group_by_product_type['default'],
246
  'type' => 'text',
247
  'css' => 'width:30%;min-width:300px;',
248
  //'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
249
  );
250
 
251
- $settings[] =
252
  array(
253
  'title' => '',//$group_by_product_type['title'],
254
  'desc' => __( 'Enable on product archives', 'woocommerce-jetpack' ),
@@ -257,7 +271,40 @@ class WCJ_Add_to_cart {
257
  'default' => 'yes',
258
  'type' => 'checkbox',
259
  //'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'disabled' ),
260
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
 
262
  if ( $group_by_product_type['id'] === 'external' ) continue;
263
 
@@ -265,7 +312,12 @@ class WCJ_Add_to_cart {
265
  array(
266
  'title' => '',//$group_by_product_type['title'],
267
  'id' => 'wcj_add_to_cart_text_on_single_in_cart_' . $group_by_product_type['id'],
268
- 'default' => 'Already in cart - Add Again?',
 
 
 
 
 
269
  'type' => 'text',
270
  'css' => 'width:30%;min-width:300px;',
271
  //'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
@@ -273,33 +325,38 @@ class WCJ_Add_to_cart {
273
  //'desc' => __( 'Set text for "Already in cart" on single product pages', 'woocommerce-jetpack' ),
274
  );
275
 
276
- $settings[] =
277
  array(
278
  'title' => '',//$group_by_product_type['title'],
279
  'desc' => __( 'Enable "Already in cart" on single product pages', 'woocommerce-jetpack' ),
280
  'id' => 'wcj_add_to_cart_text_enabled_on_single_in_cart_' . $group_by_product_type['id'],
281
  'default' => 'yes',
282
  'type' => 'checkbox',
283
- );
284
 
285
  $settings[] =
286
  array(
287
  'title' => '',//$group_by_product_type['title'],
288
  'id' => 'wcj_add_to_cart_text_on_archives_in_cart_' . $group_by_product_type['id'],
289
- 'default' => 'Already in cart - Add Again?',
 
 
 
 
 
290
  'type' => 'text',
291
  'css' => 'width:30%;min-width:300px;',
292
  //'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
293
  );
294
 
295
- $settings[] =
296
  array(
297
  'title' => '',//$group_by_product_type['title'],
298
  'desc' => __( 'Enable "Already in cart" on product archives', 'woocommerce-jetpack' ),
299
  'id' => 'wcj_add_to_cart_text_enabled_on_archives_in_cart_' . $group_by_product_type['id'],
300
  'default' => 'yes',
301
  'type' => 'checkbox',
302
- );
303
  }
304
 
305
  $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_add_to_cart_text_options' );
5
  * The WooCommerce Jetpack Add to cart class.
6
  *
7
  * @class WCJ_Add_to_cart
8
+ * @version 1.1.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
99
 
100
  global $woocommerce, $product;
101
 
102
+ if ( ! $product )
103
+ return $add_to_cart_text;
104
+
105
  $product_type = $product->product_type;
106
 
107
  if ( ! in_array( $product_type, array( 'external', 'grouped', 'simple', 'variable' ) ) )
111
  if ( current_filter() == 'woocommerce_product_single_add_to_cart_text' ) $single_or_archive = 'single';
112
  else if ( current_filter() == 'woocommerce_product_add_to_cart_text' ) $single_or_archive = 'archives';
113
 
114
+ if ( '' != $single_or_archive ) {
115
 
116
+ //if ( 'yes' === get_option( 'wcj_add_to_cart_text_enabled_on_' . $single_or_archive . '_in_cart_' . $product_type, 'no' ) ) {
117
+ if ( '' != get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_in_cart_' . $product_type, '' ) ) {
118
+ foreach( $woocommerce->cart->get_cart() as $cart_item_key => $values ) {
119
+ $_product = $values['data'];
120
+ if( get_the_ID() == $_product->id )
 
 
 
121
  return get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_in_cart_' . $product_type );
 
122
  }
123
  }
124
 
125
+ $text_on_no_price = get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_no_price_' . $product_type, '' );
126
+ if ( '' != $text_on_no_price && '' === $product->get_price() )
127
+ return $text_on_no_price;
128
+
129
+ $text_on_zero_price = get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_zero_price_' . $product_type, '' );
130
+ if ( '' != $text_on_zero_price && 0 == $product->get_price() )
131
+ return $text_on_zero_price;
132
+
133
+ //if ( get_option( 'wcj_add_to_cart_text_enabled_on_' . $single_or_archive . '_' . $product_type ) == 'yes' )
134
+ if ( '' != get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_' . $product_type ) )
135
+ return get_option( 'wcj_add_to_cart_text_on_' . $single_or_archive . '_' . $product_type );
136
+ else
137
+ return $add_to_cart_text;
138
  }
139
 
140
  // Default
234
  array(
235
  'title' => $group_by_product_type['title'],
236
  'id' => 'wcj_add_to_cart_text_on_single_' . $group_by_product_type['id'],
237
+ 'desc' => __( 'Single product view.', 'woocommerce-jetpack' ),
238
+ 'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ) . ' ' . __( 'Default: ', 'woocommerce-jetpack' ) . $group_by_product_type['default'],
239
  'default' => $group_by_product_type['default'],
240
  'type' => 'text',
241
  'css' => 'width:30%;min-width:300px;',
242
  );
243
 
244
+ /*$settings[] =
245
  array(
246
  'title' => '',//$group_by_product_type['title'],
247
  'desc' => __( 'Enable on single product pages', 'woocommerce-jetpack' ),
248
  'id' => 'wcj_add_to_cart_text_enabled_on_single_' . $group_by_product_type['id'],
249
  'default' => 'yes',
250
  'type' => 'checkbox',
251
+ );*/
252
 
253
  $settings[] =
254
  array(
255
  'title' => '',//$group_by_product_type['title'],
256
  'id' => 'wcj_add_to_cart_text_on_archives_' . $group_by_product_type['id'],
257
+ 'desc' => __( 'Product category (archive) view.', 'woocommerce-jetpack' ),
258
+ 'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ) . ' ' . __( 'Default: ', 'woocommerce-jetpack' ) . $group_by_product_type['default'],
259
  'default' => $group_by_product_type['default'],
260
  'type' => 'text',
261
  'css' => 'width:30%;min-width:300px;',
262
  //'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
263
  );
264
 
265
+ /*$settings[] =
266
  array(
267
  'title' => '',//$group_by_product_type['title'],
268
  'desc' => __( 'Enable on product archives', 'woocommerce-jetpack' ),
271
  'default' => 'yes',
272
  'type' => 'checkbox',
273
  //'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'disabled' ),
274
+ );*/
275
+
276
+ if ( 'variable' !== $group_by_product_type['id'] )
277
+ $settings = array_merge( $settings, array(
278
+
279
+ array (
280
+ 'title' => '',
281
+ 'desc' => __( 'Products with price set to 0 (i.e. free). Single product view.', 'woocommerce-jetpack' ),
282
+ 'desc_tip' => __( 'Leave blank to disable. Default: Add to cart', 'woocommerce-jetpack' ),
283
+ 'id' => 'wcj_add_to_cart_text_on_single_zero_price_' . $group_by_product_type['id'],
284
+ 'default' => __( 'Add to cart', 'woocommerce-jetpack' ),
285
+ 'type' => 'text',
286
+ 'css' => 'width:30%;min-width:300px;',
287
+ ),
288
+ array (
289
+ 'title' => '',
290
+ 'desc' => __( 'Products with price set to 0 (i.e. free). Product category (archive) view.', 'woocommerce-jetpack' ),
291
+ 'desc_tip' => __( 'Leave blank to disable. Default: Add to cart', 'woocommerce-jetpack' ),
292
+ 'id' => 'wcj_add_to_cart_text_on_archives_zero_price_' . $group_by_product_type['id'],
293
+ 'default' => __( 'Add to cart', 'woocommerce-jetpack' ),
294
+ 'type' => 'text',
295
+ 'css' => 'width:30%;min-width:300px;',
296
+ ),
297
+
298
+ array (
299
+ 'title' => '',
300
+ 'desc' => __( 'Products with empty price. Product category (archive) view.', 'woocommerce-jetpack' ),
301
+ 'desc_tip' => __( 'Leave blank to disable. Default: Read More', 'woocommerce-jetpack' ),
302
+ 'id' => 'wcj_add_to_cart_text_on_archives_no_price_' . $group_by_product_type['id'],
303
+ 'default' => __( 'Read More', 'woocommerce-jetpack' ),
304
+ 'type' => 'text',
305
+ 'css' => 'width:30%;min-width:300px;',
306
+ ),
307
+ ) );
308
 
309
  if ( $group_by_product_type['id'] === 'external' ) continue;
310
 
312
  array(
313
  'title' => '',//$group_by_product_type['title'],
314
  'id' => 'wcj_add_to_cart_text_on_single_in_cart_' . $group_by_product_type['id'],
315
+ 'desc' => __( 'Already in cart. Single product view.', 'woocommerce-jetpack' ),
316
+ 'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ) . ' ' .
317
+ __( 'Try: ', 'woocommerce-jetpack' ) . __( 'Already in cart - Add Again?', 'woocommerce-jetpack' ) . ' ' .
318
+ __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Add to cart', 'woocommerce-jetpack' ),
319
+ //'default' => __( 'Already in cart - Add Again?', 'woocommerce-jetpack' ),
320
+ 'default' => __( 'Add to cart', 'woocommerce-jetpack' ),
321
  'type' => 'text',
322
  'css' => 'width:30%;min-width:300px;',
323
  //'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
325
  //'desc' => __( 'Set text for "Already in cart" on single product pages', 'woocommerce-jetpack' ),
326
  );
327
 
328
+ /*$settings[] =
329
  array(
330
  'title' => '',//$group_by_product_type['title'],
331
  'desc' => __( 'Enable "Already in cart" on single product pages', 'woocommerce-jetpack' ),
332
  'id' => 'wcj_add_to_cart_text_enabled_on_single_in_cart_' . $group_by_product_type['id'],
333
  'default' => 'yes',
334
  'type' => 'checkbox',
335
+ );*/
336
 
337
  $settings[] =
338
  array(
339
  'title' => '',//$group_by_product_type['title'],
340
  'id' => 'wcj_add_to_cart_text_on_archives_in_cart_' . $group_by_product_type['id'],
341
+ 'desc' => __( 'Already in cart. Product category (archive) view.', 'woocommerce-jetpack' ),
342
+ 'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ) . ' ' .
343
+ __( 'Try: ', 'woocommerce-jetpack' ) . __( 'Already in cart - Add Again?', 'woocommerce-jetpack' ) . ' ' .
344
+ __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Add to cart', 'woocommerce-jetpack' ),
345
+ //'default' => __( 'Already in cart - Add Again?', 'woocommerce-jetpack' ),
346
+ 'default' => __( 'Add to cart', 'woocommerce-jetpack' ),
347
  'type' => 'text',
348
  'css' => 'width:30%;min-width:300px;',
349
  //'custom_attributes' => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
350
  );
351
 
352
+ /*$settings[] =
353
  array(
354
  'title' => '',//$group_by_product_type['title'],
355
  'desc' => __( 'Enable "Already in cart" on product archives', 'woocommerce-jetpack' ),
356
  'id' => 'wcj_add_to_cart_text_enabled_on_archives_in_cart_' . $group_by_product_type['id'],
357
  'default' => 'yes',
358
  'type' => 'checkbox',
359
+ );*/
360
  }
361
 
362
  $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_add_to_cart_text_options' );
includes/class-wcj-old-slugs.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Old Slugs class.
6
  *
7
  * @class WCJ_Old_Slugs
8
- * @version 1.2.0
9
  * @package WC_Jetpack/Classes
10
  * @category Class
11
  * @author Algoritmika Ltd.
@@ -88,8 +88,8 @@ class WCJ_Old_Slugs {
88
  array(
89
  'title' => __( 'Old Slugs', 'woocommerce-jetpack' ),
90
  'desc' => __( 'Enable the Remove Old Product Slugs feature', 'woocommerce-jetpack' ),
91
- //'desc_tip' => __( 'Remove old product slugs. Tool is accessible through <a href="/wp-admin/admin.php?page=woocommerce-jetpack-old-slugs">WooCommerce > Remove Old Slugs</a>.', 'woocommerce-jetpack' ),
92
- 'desc_tip' => __( 'Remove old product slugs.', 'woocommerce-jetpack' ),
93
  'id' => 'wcj_old_slugs_enabled',
94
  'default' => 'yes',
95
  'type' => 'checkbox'
5
  * The WooCommerce Jetpack Old Slugs class.
6
  *
7
  * @class WCJ_Old_Slugs
8
+ * @version 1.2.1
9
  * @package WC_Jetpack/Classes
10
  * @category Class
11
  * @author Algoritmika Ltd.
88
  array(
89
  'title' => __( 'Old Slugs', 'woocommerce-jetpack' ),
90
  'desc' => __( 'Enable the Remove Old Product Slugs feature', 'woocommerce-jetpack' ),
91
+ 'desc_tip' => sprintf( __( 'Remove old product slugs. When enabled, the tool is accessible through <a href="%sadmin.php?page=wcj-tools&tab=old_slugs">WooCommerce > Jetpack Tools > Remove Old Slugs</a>.', 'woocommerce-jetpack' ), admin_url() ),
92
+ //'desc_tip' => __( 'Remove old product slugs.', 'woocommerce-jetpack' ),
93
  'id' => 'wcj_old_slugs_enabled',
94
  'default' => 'yes',
95
  'type' => 'checkbox'
includes/class-wcj-orders.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Orders class.
6
  *
7
  * @class WCJ_Orders
8
- * @version 1.6.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
@@ -244,10 +244,11 @@ class WCJ_Orders {
244
  $order_timestamp = strtotime( $order->post->post_date );
245
  $order_number = apply_filters( 'wcj_get_option_filter',
246
  '#' . $order_number_meta,
247
- sprintf( '%s%s%0' . get_option( 'wcj_order_number_min_width', 0 ) . 'd',
248
  get_option( 'wcj_order_number_prefix', '' ),
249
  date_i18n( get_option( 'wcj_order_number_date_prefix', '' ), $order_timestamp ),
250
- $order_number_meta ) );
 
251
  }
252
  return $order_number;
253
  }
@@ -472,6 +473,17 @@ class WCJ_Orders {
472
  'custom_attributes'
473
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
474
  ),
 
 
 
 
 
 
 
 
 
 
 
475
 
476
  array( 'type' => 'sectionend', 'id' => 'wcj_order_numbers_options' ),
477
 
@@ -545,7 +557,7 @@ class WCJ_Orders {
545
  array(
546
  'title' => __( 'Custom Statuses', 'woocommerce-jetpack' ),
547
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
548
- //'desc_tip' => __( 'E.g. if you sell digital products then you are not shipping anything and you may want auto-complete all your orders.', 'woocommerce-jetpack' ),
549
  'id' => 'wcj_orders_custom_statuses_enabled',
550
  'default' => 'yes',
551
  'type' => 'checkbox',
5
  * The WooCommerce Jetpack Orders class.
6
  *
7
  * @class WCJ_Orders
8
+ * @version 1.7.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
244
  $order_timestamp = strtotime( $order->post->post_date );
245
  $order_number = apply_filters( 'wcj_get_option_filter',
246
  '#' . $order_number_meta,
247
+ sprintf( '%s%s%0' . get_option( 'wcj_order_number_min_width', 0 ) . 'd%s',
248
  get_option( 'wcj_order_number_prefix', '' ),
249
  date_i18n( get_option( 'wcj_order_number_date_prefix', '' ), $order_timestamp ),
250
+ $order_number_meta,
251
+ get_option( 'wcj_order_number_suffix', '' ) ) );
252
  }
253
  return $order_number;
254
  }
473
  'custom_attributes'
474
  => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
475
  ),
476
+
477
+ array(
478
+ 'title' => __( 'Order Number Custom Suffix', 'woocommerce-jetpack' ),
479
+ 'desc' => apply_filters( 'get_wc_jetpack_plus_message', '', 'desc' ),
480
+ 'desc_tip' => __( 'Suffix before order number (optional). This will change the suffixes for all existing orders.', 'woocommerce-jetpack' ),
481
+ 'id' => 'wcj_order_number_suffix',
482
+ 'default' => '',
483
+ 'type' => 'text',
484
+ 'custom_attributes'
485
+ => apply_filters( 'get_wc_jetpack_plus_message', '', 'readonly' ),
486
+ ),
487
 
488
  array( 'type' => 'sectionend', 'id' => 'wcj_order_numbers_options' ),
489
 
557
  array(
558
  'title' => __( 'Custom Statuses', 'woocommerce-jetpack' ),
559
  'desc' => __( 'Enable', 'woocommerce-jetpack' ),
560
+ 'desc_tip' => sprintf( __( 'When enabled, the Custom Statuses tool is accessible through <a href="%sadmin.php?page=wcj-tools&tab=custom_statuses">WooCommerce > Jetpack Tools > Custom Statuses</a>.', 'woocommerce-jetpack' ), admin_url() ),
561
  'id' => 'wcj_orders_custom_statuses_enabled',
562
  'default' => 'yes',
563
  'type' => 'checkbox',
includes/class-wcj-payment-gateways.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Payment Gateways class.
6
  *
7
  * @class WCJ_Payment_Gateways
8
- * @version 1.0.2
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
@@ -47,27 +47,81 @@ class WCJ_Payment_Gateways {
47
  add_filter( $filter_name, array( $this, 'set_icon' ) );
48
 
49
  // Settings
50
- add_filter( 'woocommerce_payment_gateways_settings', array( $this, 'add_woocommerce_icons_options' ), 100 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
52
 
53
  // Settings hooks
54
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
55
  add_filter( 'wcj_settings_payment_gateways', array( $this, 'get_settings' ), 100 );
56
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
57
- }
58
 
59
  /**
60
- * add_enabled_option.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  */
62
  function add_woocommerce_icons_options( $settings ) {
63
 
64
- $settings[] = array( 'title' => __( 'WooCommerce Jetpack: Default WooCommerce Payment Gateways Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'If you want to show an image next to the gateway\'s name on the frontend, enter a URL to an image.', 'woocommerce-jetpack' ), 'id' => 'wcj_payment_gateways_icons_options' );
65
 
66
  foreach ( $this->woocommerce_icon_filters as $filter_name => $filter_title ) {
67
  // Prepare current value
68
  $desc = '';
69
  $icon_url = apply_filters( $filter_name, '' );
70
- if ( $icon_url !== '' )
71
  $desc = '<img src="' . $icon_url . '" alt="' . $filter_title . '" title="' . $filter_title . '" />';
72
  //$desc = __( 'Current Icon: ', 'woocommerce-jetpack' ) . '<img src="' . $icon_url . '" alt="' . $filter_title . '" title="' . $filter_title . '" />';
73
 
@@ -83,8 +137,118 @@ class WCJ_Payment_Gateways {
83
  );
84
  }
85
 
86
- $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_payment_gateways_icons_options' );
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  return $settings;
89
  }
90
 
@@ -154,7 +318,7 @@ class WCJ_Payment_Gateways {
154
  // Prepare current value
155
  $desc = '';
156
  $icon_url = apply_filters( $filter_name, '' );
157
- if ( $icon_url !== '' )
158
  $desc = '<img src="' . $icon_url . '" alt="' . $filter_title . '" title="' . $filter_title . '" />';
159
  //$desc = __( 'Current Icon: ', 'woocommerce-jetpack' ) . '<img src="' . $icon_url . '" alt="' . $filter_title . '" title="' . $filter_title . '" />';
160
 
@@ -170,18 +334,32 @@ class WCJ_Payment_Gateways {
170
  );
171
  }
172
 
173
- $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_payment_gateways_icons_options' );
174
-
175
- return $settings;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  }
177
 
178
  /**
179
  * settings_section.
180
  */
181
- function settings_section( $sections ) {
182
-
183
- $sections['payment_gateways'] = __( 'Payment Gateways', 'woocommerce-jetpack' );
184
-
185
  return $sections;
186
  }
187
  }
5
  * The WooCommerce Jetpack Payment Gateways class.
6
  *
7
  * @class WCJ_Payment_Gateways
8
+ * @version 1.1.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
47
  add_filter( $filter_name, array( $this, 'set_icon' ) );
48
 
49
  // Settings
50
+ add_filter( 'woocommerce_payment_gateways_settings', array( $this, 'add_woocommerce_icons_options' ), 100 );
51
+
52
+ // PDF Invoices
53
+ if ( 'yes' === get_option( 'wcj_pdf_invoices_enabled' ) && 'yes' === get_option( 'wcj_pdf_invoices_attach_to_email_enabled' ) )
54
+ add_filter( 'woocommerce_payment_gateways_settings', array( $this, 'add_attach_invoice_settings' ), 100 );
55
+
56
+ // Payment Gateways Fees
57
+ if ( 'yes' === get_option( 'wcj_payment_gateways_fees_enabled' ) ) {
58
+ // Main Hooks
59
+ add_action( 'woocommerce_cart_calculate_fees', array( $this, 'gateways_fees' ) );
60
+ add_action( 'wp_enqueue_scripts' , array( $this, 'enqueue_checkout_script' ) );
61
+ // Settings Hooks
62
+ add_filter( 'woocommerce_payment_gateways_settings', array( $this, 'add_fees_settings' ), 100 );
63
+ // Scripts
64
+ wp_register_script( 'wcj-payment-gateways-checkout', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/checkout.js', array( 'jquery' ), false, true );
65
+ }
66
  }
67
 
68
  // Settings hooks
69
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
70
  add_filter( 'wcj_settings_payment_gateways', array( $this, 'get_settings' ), 100 );
71
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
72
+ }
73
 
74
  /**
75
+ * enqueue_checkout_script.
76
+ */
77
+ public function enqueue_checkout_script() {
78
+ if( !is_checkout() )
79
+ return;
80
+ wp_enqueue_script( 'wcj-payment-gateways-checkout' );
81
+ }
82
+
83
+ /**
84
+ * gateways_fees.
85
+ */
86
+ function gateways_fees() {
87
+
88
+ global $woocommerce;
89
+
90
+ // TODO: What is this for?
91
+ //if ( is_admin() && ! defined( 'DOING_AJAX' ) )
92
+ // return;
93
+
94
+ $current_gateway = $woocommerce->session->chosen_payment_method;
95
+ if ( '' != $current_gateway ) {
96
+ $fee_text = get_option( 'wcj_gateways_fees_text_' . $current_gateway );
97
+ if ( '' != $fee_text ) {
98
+ $fee_value = get_option( 'wcj_gateways_fees_value_' . $current_gateway );
99
+ $fee_type = apply_filters( 'wcj_get_option_filter', 'fixed', get_option( 'wcj_gateways_fees_type_' . $current_gateway ) );
100
+ $final_fee_to_add = 0;
101
+ // Fees are applied BEFORE taxes
102
+ $total_in_cart = $woocommerce->cart->cart_contents_total + $woocommerce->cart->shipping_total;
103
+ switch ( $fee_type ) {
104
+ case 'fixed': $final_fee_to_add = $fee_value; break;
105
+ case 'percent': $final_fee_to_add = ( $fee_value / 100 ) * $total_in_cart; break;
106
+ }
107
+ if ( '' != $fee_text && 0 != $final_fee_to_add )
108
+ $woocommerce->cart->add_fee( $fee_text, $final_fee_to_add, true );//, 'standard' );
109
+ }
110
+ }
111
+ }
112
+
113
+ /**
114
+ * add_woocommerce_icons_options.
115
  */
116
  function add_woocommerce_icons_options( $settings ) {
117
 
118
+ $settings[] = array( 'title' => __( 'WooCommerce Jetpack: Default WooCommerce Payment Gateways Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'If you want to show an image next to the gateway\'s name on the frontend, enter a URL to an image.', 'woocommerce-jetpack' ), 'id' => 'wcj_payment_gateways_icons_options' );
119
 
120
  foreach ( $this->woocommerce_icon_filters as $filter_name => $filter_title ) {
121
  // Prepare current value
122
  $desc = '';
123
  $icon_url = apply_filters( $filter_name, '' );
124
+ if ( '' != $icon_url )
125
  $desc = '<img src="' . $icon_url . '" alt="' . $filter_title . '" title="' . $filter_title . '" />';
126
  //$desc = __( 'Current Icon: ', 'woocommerce-jetpack' ) . '<img src="' . $icon_url . '" alt="' . $filter_title . '" title="' . $filter_title . '" />';
127
 
137
  );
138
  }
139
 
140
+ $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_payment_gateways_icons_options' );
141
 
142
+ return $settings;
143
+ }
144
+
145
+ /**
146
+ * add_fees_settings.
147
+ */
148
+ function add_fees_settings( $settings ) {
149
+ // Gateway's Extra Fees
150
+ $settings[] = array(
151
+ 'title' => __( 'Payment Gateways Fees Options', 'woocommerce-jetpack' ),
152
+ 'type' => 'title',
153
+ 'desc' => __( 'This section lets you set extra fees for payment gateways.', 'woocommerce-jetpack' ) . ' ' .
154
+ __( 'Fees are applied BEFORE taxes.', 'woocommerce-jetpack' ),
155
+ 'id' => 'wcj_payment_gateways_fees_options' );
156
+
157
+ //$available_gateways = WC()->payment_gateways->payment_gateways();
158
+ global $woocommerce;
159
+ $available_gateways = $woocommerce->payment_gateways->payment_gateways();
160
+ foreach ( $available_gateways as $key => $gateway ) {
161
+ /*echo '<h5>' . $gateway->title . '</h5>';
162
+ if ( $gateway->is_available() )
163
+ echo '<strong style="color: green;">' . __( 'Available', 'woocommerce-jetpack' ) . '</strong>';
164
+ else
165
+ echo '<strong style="color: red;">' . __( 'Not available', 'woocommerce-jetpack' ) . '</strong>';*/
166
+
167
+ $settings = array_merge( $settings, array(
168
+
169
+ array(
170
+ 'title' => $gateway->title,
171
+ 'desc' => __( 'Fee title to show to customer.', 'woocommerce-jetpack' ),
172
+ 'desc_tip' => __( 'Leave blank to disable.', 'woocommerce-jetpack' ),
173
+ 'id' => 'wcj_gateways_fees_text_' . $key,
174
+ 'default' => '',
175
+ 'type' => 'text',
176
+ ),
177
+
178
+ array(
179
+ 'title' => '',
180
+ 'desc' => __( 'Fee type.', 'woocommerce-jetpack' ),
181
+ 'desc_tip' => __( 'Percent or fixed value.', 'woocommerce-jetpack' ) . ' ' . apply_filters( 'get_wc_jetpack_plus_message', '', 'desc_no_link' ),
182
+ 'custom_attributes'
183
+ => apply_filters( 'get_wc_jetpack_plus_message', '', 'disabled' ),
184
+ 'id' => 'wcj_gateways_fees_type_' . $key,
185
+ 'default' => 'fixed',
186
+ 'type' => 'select',
187
+ 'options' => array(
188
+ 'percent' => __( 'Percent', 'woocommerce-jetpack' ),
189
+ 'fixed' => __( 'Fixed', 'woocommerce-jetpack' ),
190
+ ),
191
+ ),
192
+
193
+ array(
194
+ 'title' => '',
195
+ 'desc' => __( 'Fee value.', 'woocommerce-jetpack' ),
196
+ 'desc_tip' => __( 'The value.', 'woocommerce-jetpack' ),
197
+ 'id' => 'wcj_gateways_fees_value_' . $key,
198
+ 'default' => 0,
199
+ 'type' => 'number',
200
+ 'custom_attributes' => array(
201
+ 'step' => '1',
202
+ 'min' => '0',
203
+ ),
204
+ ),
205
+
206
+ /*array(
207
+ 'title' => '',
208
+ 'desc' => __( 'Taxes.', 'woocommerce-jetpack' ),
209
+ //'desc_tip' => __( 'Percent or fixed value.', 'woocommerce-jetpack' ),
210
+ 'id' => 'wcj_gateways_fees_tax_' . $key,
211
+ 'default' => ,
212
+ 'type' => 'select',
213
+ 'options' => array(
214
+
215
+ ),
216
+ ),*/
217
+
218
+ ) );
219
+ }
220
+
221
+ $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_payment_gateways_fees_options' );
222
+
223
+ return $settings;
224
+ }
225
+
226
+ /**
227
+ * add_attach_invoice_settings.
228
+ */
229
+ function add_attach_invoice_settings( $settings ) {
230
+ $settings[] = array( 'title' => __( 'Payment Gateways Attach PDF Invoice Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This section lets you choose when to attach PDF invoice to customers emails.', 'woocommerce-jetpack' ), 'id' => 'wcj_gateways_attach_invoice_options' );
231
+ global $woocommerce;
232
+ $available_gateways = $woocommerce->payment_gateways->payment_gateways();
233
+ foreach ( $available_gateways as $key => $gateway ) {
234
+
235
+ $settings = array_merge( $settings, array(
236
+
237
+ array(
238
+ 'title' => $gateway->title,
239
+ //'desc' => __( 'Attach PDF invoice to customers emails.', 'woocommerce-jetpack' ),
240
+ 'desc' => __( 'Attach PDF invoice.', 'woocommerce-jetpack' ),
241
+ 'id' => 'wcj_gateways_attach_invoice_' . $key,
242
+ 'default' => 'yes',
243
+ 'type' => 'checkbox',
244
+ ),
245
+
246
+
247
+ ) );
248
+ }
249
+
250
+ $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_gateways_attach_invoice_options' );
251
+
252
  return $settings;
253
  }
254
 
318
  // Prepare current value
319
  $desc = '';
320
  $icon_url = apply_filters( $filter_name, '' );
321
+ if ( '' != $icon_url )
322
  $desc = '<img src="' . $icon_url . '" alt="' . $filter_title . '" title="' . $filter_title . '" />';
323
  //$desc = __( 'Current Icon: ', 'woocommerce-jetpack' ) . '<img src="' . $icon_url . '" alt="' . $filter_title . '" title="' . $filter_title . '" />';
324
 
334
  );
335
  }
336
 
337
+ $settings[] = array( 'type' => 'sectionend', 'id' => 'wcj_payment_gateways_icons_options' );
338
+
339
+ //$settings = $this->add_fees_settings( $settings );
340
+ $settings = array_merge( $settings, array(
341
+
342
+ array( 'title' => __( 'Payment Gateways Fees Options', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => __( 'This section lets you enable extra fees for payment gateways. When enabled all options are added to WooCommerce > Settings > Checkout', 'woocommerce-jetpack' ), 'id' => 'wcj_payment_gateways_fees_options' ),
343
+
344
+ array(
345
+ 'title' => __( 'Payment Gateways Fees', 'woocommerce-jetpack' ),
346
+ 'desc' => __( 'Enable the Payment Gateways Fees', 'woocommerce-jetpack' ),
347
+ 'id' => 'wcj_payment_gateways_fees_enabled',
348
+ 'default' => 'yes',
349
+ 'type' => 'checkbox',
350
+ ),
351
+
352
+ array( 'type' => 'sectionend', 'id' => 'wcj_payment_gateways_fees_options' ),
353
+ ) );
354
+
355
+ return $settings;
356
  }
357
 
358
  /**
359
  * settings_section.
360
  */
361
+ function settings_section( $sections ) {
362
+ $sections['payment_gateways'] = __( 'Payment Gateways', 'woocommerce-jetpack' );
 
 
363
  return $sections;
364
  }
365
  }
includes/class-wcj-pdf-invoices.php CHANGED
@@ -53,11 +53,18 @@ class WCJ_PDF_Invoices {
53
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
54
  }
55
 
 
 
 
 
 
 
 
56
  /**
57
  * add_pdf_invoice_email_attachment.
58
  */
59
  public function add_pdf_invoice_email_attachment( $attachments, $status, $order ) {
60
- if ( ( isset( $status ) && 'customer_completed_order' === $status ) && isset( $order ) ) {
61
  $file_name = sys_get_temp_dir() . '/invoice-' . $order->id . '.pdf';
62
  $result = file_put_contents( $file_name, $this->generate_pdf( $order->id ) );
63
  $attachments[] = $file_name;
@@ -282,8 +289,6 @@ class WCJ_PDF_Invoices {
282
  $order_total_shipping_tax = $the_order->get_shipping_tax();
283
  $order_total_discount = $the_order->get_total_discount();
284
 
285
-
286
-
287
  $order_tax_percent = 0;
288
  $order_total_before_discount = $order_total + $order_total_discount;
289
  if ( 0 != $order_total_before_discount )
@@ -564,6 +569,11 @@ class WCJ_PDF_Invoices {
564
 
565
  // ORDER TOTALS //
566
  $html .= '<p><table class="pdf_invoice_totals_table_wcj"><tbody>';
 
 
 
 
 
567
  // SUBTOTAL
568
  //$html .= '<tr><th>' . get_option( 'wcj_pdf_invoices_order_subtotal_text' ) . '</th><td>' . wc_price( ( $order_subtotal + $order_total_discount_excl_tax ), $order_currency_array ) . '</td></tr>';
569
  $html .= '<tr><th>' . get_option( 'wcj_pdf_invoices_order_subtotal_text' ) . '</th><td>' . wc_price( $order_subtotal, $order_currency_array ) . '</td></tr>';
@@ -594,6 +604,11 @@ class WCJ_PDF_Invoices {
594
  // SHIPPING METHOD
595
  if ( '' != get_option( 'wcj_pdf_invoices_order_shipping_method_text' ) )
596
  $html .= '<p>' . get_option( 'wcj_pdf_invoices_order_shipping_method_text' ). ': ' . $the_order->get_shipping_method() . '</p>';
 
 
 
 
 
597
  // ADDITIONAL FOOTER
598
  if ( '' != get_option( 'wcj_pdf_invoices_footer_text' ) ) {
599
  $additional_footer = str_replace( PHP_EOL, '<br>', get_option( 'wcj_pdf_invoices_footer_text' ) );
@@ -1044,6 +1059,15 @@ class WCJ_PDF_Invoices {
1044
  'type' => 'text',
1045
  'css' => 'width:33%;min-width:300px;',
1046
  ),
 
 
 
 
 
 
 
 
 
1047
 
1048
  array(
1049
  'title' => __( 'Additional Footer', 'woocommerce-jetpack' ),
@@ -1123,9 +1147,7 @@ class WCJ_PDF_Invoices {
1123
  * settings_section.
1124
  */
1125
  function settings_section( $sections ) {
1126
-
1127
  $sections['pdf_invoices'] = __( 'PDF Invoices', 'woocommerce-jetpack' );
1128
-
1129
  return $sections;
1130
  }
1131
  }
53
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
54
  }
55
 
56
+ /**
57
+ * do_attach_for_payment_method.
58
+ */
59
+ public function do_attach_for_payment_method( $payment_method ) {
60
+ return ( 'no' === get_option( 'wcj_gateways_attach_invoice_' . $payment_method, 'yes' ) ) ? false : true;
61
+ }
62
+
63
  /**
64
  * add_pdf_invoice_email_attachment.
65
  */
66
  public function add_pdf_invoice_email_attachment( $attachments, $status, $order ) {
67
+ if ( isset( $status ) && 'customer_completed_order' === $status && isset( $order ) && true === $this->do_attach_for_payment_method( $order->payment_method ) ) {
68
  $file_name = sys_get_temp_dir() . '/invoice-' . $order->id . '.pdf';
69
  $result = file_put_contents( $file_name, $this->generate_pdf( $order->id ) );
70
  $attachments[] = $file_name;
289
  $order_total_shipping_tax = $the_order->get_shipping_tax();
290
  $order_total_discount = $the_order->get_total_discount();
291
 
 
 
292
  $order_tax_percent = 0;
293
  $order_total_before_discount = $order_total + $order_total_discount;
294
  if ( 0 != $order_total_before_discount )
569
 
570
  // ORDER TOTALS //
571
  $html .= '<p><table class="pdf_invoice_totals_table_wcj"><tbody>';
572
+ // FEES
573
+ $fees_array = $the_order->get_fees();
574
+ if ( ! empty( $fees_array ) )
575
+ foreach ( $fees_array as $key => $fee_array )
576
+ $html .= '<tr><th>' . $fee_array['name'] . '</th><td>' . wc_price( $fee_array['line_total'], $order_currency_array ) . '</td></tr>';
577
  // SUBTOTAL
578
  //$html .= '<tr><th>' . get_option( 'wcj_pdf_invoices_order_subtotal_text' ) . '</th><td>' . wc_price( ( $order_subtotal + $order_total_discount_excl_tax ), $order_currency_array ) . '</td></tr>';
579
  $html .= '<tr><th>' . get_option( 'wcj_pdf_invoices_order_subtotal_text' ) . '</th><td>' . wc_price( $order_subtotal, $order_currency_array ) . '</td></tr>';
604
  // SHIPPING METHOD
605
  if ( '' != get_option( 'wcj_pdf_invoices_order_shipping_method_text' ) )
606
  $html .= '<p>' . get_option( 'wcj_pdf_invoices_order_shipping_method_text' ). ': ' . $the_order->get_shipping_method() . '</p>';
607
+ // SHIPPING ADDRESS
608
+ if ( '' != get_option( 'wcj_pdf_invoices_order_shipping_address_text' ) &&
609
+ $the_order->get_formatted_billing_address() != $the_order->get_formatted_shipping_address() )
610
+ $html .= '<p>' . get_option( 'wcj_pdf_invoices_order_shipping_address_text' ). ':<br>' . $the_order->get_formatted_shipping_address() . '</p>';
611
+
612
  // ADDITIONAL FOOTER
613
  if ( '' != get_option( 'wcj_pdf_invoices_footer_text' ) ) {
614
  $additional_footer = str_replace( PHP_EOL, '<br>', get_option( 'wcj_pdf_invoices_footer_text' ) );
1059
  'type' => 'text',
1060
  'css' => 'width:33%;min-width:300px;',
1061
  ),
1062
+
1063
+ array(
1064
+ 'title' => __( 'Shipping Address', 'woocommerce-jetpack' ),
1065
+ 'desc_tip' => __( 'Will be displayed only if customer\'s shipping address differs from billing address. Leave blank to disable', 'woocommerce-jetpack' ),
1066
+ 'id' => 'wcj_pdf_invoices_order_shipping_address_text',
1067
+ 'default' => __( 'Shipping Address', 'woocommerce-jetpack' ),
1068
+ 'type' => 'text',
1069
+ 'css' => 'width:33%;min-width:300px;',
1070
+ ),
1071
 
1072
  array(
1073
  'title' => __( 'Additional Footer', 'woocommerce-jetpack' ),
1147
  * settings_section.
1148
  */
1149
  function settings_section( $sections ) {
 
1150
  $sections['pdf_invoices'] = __( 'PDF Invoices', 'woocommerce-jetpack' );
 
1151
  return $sections;
1152
  }
1153
  }
includes/class-wcj-product-info.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Product Info class.
6
  *
7
  * @class WCJ_Product_Info
8
- * @version 1.3.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
@@ -67,10 +67,11 @@ class WCJ_Product_Info {
67
  '%time_since_last_sale%',
68
  //'%available_variations%',
69
  '%list_attributes%',
 
70
  );
71
 
72
  // Main hooks
73
- if ( 'yes' === get_option( 'wcj_product_info_enabled' ) ) {
74
  // Product Info
75
  $this->add_product_info_filters( 'archive' );
76
  $this->add_product_info_filters( 'single' );
@@ -85,14 +86,36 @@ class WCJ_Product_Info {
85
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
86
  add_filter( 'wcj_settings_product_info', array( $this, 'get_settings' ), 100 );
87
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  }
89
 
90
  /**
91
  * add_product_info_filters.
92
  */
93
  public function list_short_codes() {
94
- //return __( 'Available short codes are:', 'woocommerce-jetpack' ) . ' ' . implode( ", ", $this->product_info_shortcodes_array );
95
- return __( 'Available short codes are:', 'woocommerce-jetpack' ) . '<ul><li>' . implode( '</li><li>', $this->product_info_shortcodes_array ) . '</li></ul>';
96
  }
97
 
98
  /**
@@ -170,7 +193,7 @@ class WCJ_Product_Info {
170
  }
171
  }
172
  }
173
- echo $the_product_info;
174
  }
175
 
176
  /**
@@ -310,6 +333,13 @@ class WCJ_Product_Info {
310
  else
311
  return false;
312
 
 
 
 
 
 
 
 
313
  // Not finished!
314
  case '%available_variations%':
315
  if ( $product->is_type( 'variable' ) )
5
  * The WooCommerce Jetpack Product Info class.
6
  *
7
  * @class WCJ_Product_Info
8
+ * @version 1.4.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
67
  '%time_since_last_sale%',
68
  //'%available_variations%',
69
  '%list_attributes%',
70
+ '%stock_quantity%',
71
  );
72
 
73
  // Main hooks
74
+ if ( 'yes' === get_option( 'wcj_product_info_enabled' ) ) {
75
  // Product Info
76
  $this->add_product_info_filters( 'archive' );
77
  $this->add_product_info_filters( 'single' );
86
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) );
87
  add_filter( 'wcj_settings_product_info', array( $this, 'get_settings' ), 100 );
88
  add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 );
89
+
90
+ // Shortcodes
91
+ add_shortcode( 'wcjp_list_attribute', array( $this, 'shortcode_wcjp_list_attribute' ) );
92
+ }
93
+
94
+ /**
95
+ * shortcode_wcjp_list_attribute.
96
+ */
97
+ public function shortcode_wcjp_list_attribute( $atts ) {
98
+ $atts_array = shortcode_atts( array(
99
+ 'attribute_name' => '',
100
+ 'before' => '',
101
+ 'after' => '',
102
+ 'visibility' => '',
103
+ ), $atts );
104
+ global $product;
105
+ if ( '' != $atts_array['attribute_name'] && $product && '' != $product->get_attribute( $atts_array['attribute_name'] ) ) {
106
+ if ( 'admin' === $atts_array['visibility'] && !is_super_admin() )
107
+ return '';
108
+ return $atts_array['before'] . $product->get_attribute( $atts_array['attribute_name'] ) . $atts_array['after'];
109
+ }
110
+ return '';
111
  }
112
 
113
  /**
114
  * add_product_info_filters.
115
  */
116
  public function list_short_codes() {
117
+ //return __( 'Available shortcodes are:', 'woocommerce-jetpack' ) . ' ' . implode( ", ", $this->product_info_shortcodes_array );
118
+ return __( 'Available shortcodes are:', 'woocommerce-jetpack' ) . '<ul><li>' . implode( '</li><li>', $this->product_info_shortcodes_array ) . '</li></ul>';
119
  }
120
 
121
  /**
193
  }
194
  }
195
  }
196
+ echo apply_filters( 'the_content', $the_product_info );
197
  }
198
 
199
  /**
333
  else
334
  return false;
335
 
336
+ case '%stock_quantity%':
337
+ $stock_quantity = $product->get_stock_quantity();
338
+ if ( '' != $stock_quantity )
339
+ return $stock_quantity;
340
+ else
341
+ return false;
342
+
343
  // Not finished!
344
  case '%available_variations%':
345
  if ( $product->is_type( 'variable' ) )
includes/class-wcj-product-tabs.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Product Tabs class.
6
  *
7
  * @class WCJ_Product_Tabs
8
- * @version 1.1.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
@@ -71,14 +71,73 @@ class WCJ_Product_Tabs {
71
 
72
  // Add New
73
  // Add New - Global
 
74
  for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_custom_product_tabs_global_total_number', 1 ) ); $i++ ) {
75
  $key = 'global_' . $i;
76
- if ( '' != get_option( 'wcj_custom_product_tabs_title_' . $key, '' ) && '' != get_option( 'wcj_custom_product_tabs_content_' . $key, '' ) )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  $tabs[ $key ] = array(
78
  'title' => get_option( 'wcj_custom_product_tabs_title_' . $key ),
79
  'priority' => get_option( 'wcj_custom_product_tabs_priority_' . $key, 40 ),
80
  'callback' => array( $this, 'create_new_custom_product_tab_global' ),
81
  );
 
82
  }
83
  // Add New - Local
84
  $current_post_id = get_the_ID();
@@ -301,7 +360,43 @@ class WCJ_Product_Tabs {
301
  'default' => '',
302
  'type' => 'textarea',
303
  'css' => 'width:50%;min-width:300px;height:200px;',
304
- ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  )
306
  );
307
  }
5
  * The WooCommerce Jetpack Product Tabs class.
6
  *
7
  * @class WCJ_Product_Tabs
8
+ * @version 1.2.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
71
 
72
  // Add New
73
  // Add New - Global
74
+ global $product;
75
  for ( $i = 1; $i <= apply_filters( 'wcj_get_option_filter', 1, get_option( 'wcj_custom_product_tabs_global_total_number', 1 ) ); $i++ ) {
76
  $key = 'global_' . $i;
77
+ if ( '' != get_option( 'wcj_custom_product_tabs_title_' . $key, '' ) && '' != get_option( 'wcj_custom_product_tabs_content_' . $key, '' ) ) {
78
+
79
+ // Exclude by product id
80
+ $list_to_exclude = get_option( 'wcj_custom_product_tabs_title_global_hide_in_product_ids_' . $i );
81
+ if ( '' != $list_to_exclude ) {
82
+ $array_to_exclude = explode( ',', $list_to_exclude );
83
+ if ( $product && $array_to_exclude && in_array( $product->id, $array_to_exclude ) )
84
+ continue;
85
+ }
86
+
87
+ // Exclude by product category
88
+ $list_to_exclude = get_option( 'wcj_custom_product_tabs_title_global_hide_in_cats_ids_' . $i );
89
+ if ( '' != $list_to_exclude ) {
90
+ $array_to_exclude = explode( ',', $list_to_exclude );
91
+
92
+ $do_exclude = false;
93
+ $product_categories_objects = get_the_terms( $product->id, 'product_cat' );
94
+ if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
95
+ foreach ( $product_categories_objects as $product_categories_object ) {
96
+ if ( $product && $array_to_exclude && in_array( $product_categories_object->term_id, $array_to_exclude ) ) {
97
+ $do_exclude = true;
98
+ break;
99
+ }
100
+ }
101
+ }
102
+ if ( $do_exclude )
103
+ continue;
104
+ }
105
+
106
+ // Include by product id
107
+ $list_to_include = get_option( 'wcj_custom_product_tabs_title_global_show_in_product_ids_' . $i );
108
+ if ( '' != $list_to_include ) {
109
+ $array_to_include = explode( ',', $list_to_include );
110
+ // If NOT in array then hide this tab for this product
111
+ if ( $product && $array_to_include && ! in_array( $product->id, $array_to_include ) )
112
+ continue;
113
+ }
114
+
115
+ // Include by product category
116
+ $list_to_include = get_option( 'wcj_custom_product_tabs_title_global_show_in_cats_ids_' . $i );
117
+ if ( '' != $list_to_include ) {
118
+ $array_to_include = explode( ',', $list_to_include );
119
+
120
+ $do_include = false;
121
+ $product_categories_objects = get_the_terms( $product->id, 'product_cat' );
122
+ if ( $product_categories_objects && ! empty( $product_categories_objects ) ) {
123
+ foreach ( $product_categories_objects as $product_categories_object ) {
124
+ if ( $product && $array_to_include && in_array( $product_categories_object->term_id, $array_to_include ) ) {
125
+ $do_include = true;
126
+ break;
127
+ }
128
+ }
129
+ }
130
+ if ( ! $do_include )
131
+ continue;
132
+ }
133
+
134
+ // Adding the tab
135
  $tabs[ $key ] = array(
136
  'title' => get_option( 'wcj_custom_product_tabs_title_' . $key ),
137
  'priority' => get_option( 'wcj_custom_product_tabs_priority_' . $key, 40 ),
138
  'callback' => array( $this, 'create_new_custom_product_tab_global' ),
139
  );
140
+ }
141
  }
142
  // Add New - Local
143
  $current_post_id = get_the_ID();
360
  'default' => '',
361
  'type' => 'textarea',
362
  'css' => 'width:50%;min-width:300px;height:200px;',
363
+ ),
364
+ array(
365
+ 'title' => '',
366
+ 'desc' => __( 'Comma separated PRODUCT IDs to HIDE this tab', 'woocommerce-jetpack' ),
367
+ 'desc_tip' => __( 'To hide this tab from some products, enter product IDs here.', 'woocommerce-jetpack' ),
368
+ 'id' => 'wcj_custom_product_tabs_title_global_hide_in_product_ids_' . $i,
369
+ 'default' => '',
370
+ 'type' => 'text',
371
+ 'css' => 'width:30%;min-width:300px;',
372
+ ),
373
+ array(
374
+ 'title' => '',
375
+ 'desc' => __( 'Comma separated CATEGORY IDs to HIDE this tab', 'woocommerce-jetpack' ),
376
+ 'desc_tip' => __( 'To hide this tab from some categories, enter category IDs here.', 'woocommerce-jetpack' ),
377
+ 'id' => 'wcj_custom_product_tabs_title_global_hide_in_cats_ids_' . $i,
378
+ 'default' => '',
379
+ 'type' => 'text',
380
+ 'css' => 'width:30%;min-width:300px;',
381
+ ),
382
+ array(
383
+ 'title' => '',
384
+ 'desc' => __( 'Comma separated PRODUCT IDs to SHOW this tab', 'woocommerce-jetpack' ),
385
+ 'desc_tip' => __( 'To show this tab only for some products, enter product IDs here.', 'woocommerce-jetpack' ),
386
+ 'id' => 'wcj_custom_product_tabs_title_global_show_in_product_ids_' . $i,
387
+ 'default' => '',
388
+ 'type' => 'text',
389
+ 'css' => 'width:30%;min-width:300px;',
390
+ ),
391
+ array(
392
+ 'title' => '',
393
+ 'desc' => __( 'Comma separated CATEGORY IDs to SHOW this tab', 'woocommerce-jetpack' ),
394
+ 'desc_tip' => __( 'To show this tab only for some categories, enter category IDs here.', 'woocommerce-jetpack' ),
395
+ 'id' => 'wcj_custom_product_tabs_title_global_show_in_cats_ids_' . $i,
396
+ 'default' => '',
397
+ 'type' => 'text',
398
+ 'css' => 'width:30%;min-width:300px;',
399
+ ),
400
  )
401
  );
402
  }
includes/class-wcj-reports.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Reports class.
6
  *
7
  * @class WCJ_Reports
8
- * @version 1.1.2.1
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
@@ -22,64 +22,143 @@ class WCJ_Reports {
22
  public function __construct() {
23
 
24
  // Main hooks
25
- if ( get_option( 'wcj_reports_enabled' ) == 'yes' ) {
26
  if ( is_admin() ) {
27
- add_filter( 'wcj_tools_tabs', array( $this, 'add_reports_tool_tab' ), 100 );
28
- add_action( 'wcj_tools_reports', array( $this, 'create_reports_tool' ), 100 );
 
 
29
  }
30
  }
31
 
32
  // Settings hooks
33
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) ); // Add section to WooCommerce > Settings > Jetpack
34
  add_filter( 'wcj_settings_reports', array( $this, 'get_settings' ), 100 ); // Add the settings
35
- add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 ); // Add Enable option to Jetpack Settings Dashboard
36
-
37
-
38
- add_filter( 'woocommerce_admin_reports', array( $this, 'add_customers_by_country_report' ) );
39
-
40
  }
41
 
42
  /**
43
  * prepare_items function.
44
  */
45
  public function prepare_items() {
 
 
 
 
46
 
 
 
47
 
48
  //$customers = get_users( 'orderby=nicename&role=customer' );
49
  $customers = get_users( 'role=customer' );
50
  // Array of WP_User objects.
51
  foreach ( $customers as $customer ) {
52
  //print_r( $user );
53
- //print_r( get_user_meta( $user->ID ) );
54
  $user_meta = get_user_meta( $customer->ID );
55
- $customer_country = isset( $user_meta['billing_country'][0] ) ? $user_meta['billing_country'][0] : 'UNKNOWN';
 
 
 
 
 
 
 
 
 
 
 
56
  //echo "<p>$customer_country</p>";
57
  $country_counter[ $customer_country ]++;
58
  }
59
 
60
- echo '<pre>';
61
- print_r( $country_counter );
62
- echo '</pre>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
 
65
  /**
66
  * Add tab to WooCommerce > Jetpack Tools.
67
  */
68
  public function add_customers_by_country_report( $reports ) {
69
- $reports['wcj_reports'] = array(
70
  'title' => __( 'WooCommerce Jetpack Reports', 'woocommerce-jetpack' ),
71
  'reports' => array(
72
  'customers_by_country' => array(
73
- 'title' => __( 'Customers By Country', 'woocommerce' ),
74
  'description' => '',
75
  'hide_title' => true,
76
  'callback' => array( $this, 'get_report' ),
77
  ),
78
  ),
79
- );
80
 
81
  $reports['customers']['reports']['customers_by_country'] = array(
82
- 'title' => __( 'Customers By Country', 'woocommerce-jetpack' ),
83
  'description' => '',
84
  'hide_title' => true,
85
  'callback' => array( $this, 'get_report' ),
@@ -98,7 +177,7 @@ class WCJ_Reports {
98
  public function add_reports_tool_tab( $tabs ) {
99
  $tabs[] = array(
100
  'id' => 'reports',
101
- 'title' => __( 'Smart Reports', 'woocommerce-jetpack' ),
102
  );
103
  return $tabs;
104
  }
@@ -124,12 +203,31 @@ class WCJ_Reports {
124
  array(
125
  'title' => __( 'Reports', 'woocommerce-jetpack' ),
126
  'desc' => __( 'Enable the Reports feature', 'woocommerce-jetpack' ),
 
127
  'id' => 'wcj_reports_enabled',
128
  'default' => 'yes',
129
  'type' => 'checkbox'
130
  ),
131
 
132
  array( 'type' => 'sectionend', 'id' => 'wcj_reports_options' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  );
134
 
135
  return $settings;
@@ -139,7 +237,7 @@ class WCJ_Reports {
139
  * Add settings section to WooCommerce > Settings > Jetpack.
140
  */
141
  function settings_section( $sections ) {
142
- $sections['reports'] = __( 'Smart Reports', 'woocommerce-jetpack' );
143
  return $sections;
144
  }
145
 
@@ -229,11 +327,18 @@ class WCJ_Reports {
229
  $now_time = time();
230
  $order_age = ( $now_time - $the_timestamp );
231
  $one_day_seconds = ( 24 * 60 * 60 );
 
 
 
 
232
 
233
- foreach ( $products_info[$item['product_id']]['sales_in_period'] as $the_period => $the_value ) {
234
- if ( $order_age < ( $the_period * $one_day_seconds ) ) {
235
- $products_info[$item['product_id']]['sales_in_period'][$the_period] += $item['qty'];
236
- //$products_info[$item['product_id']]['orders_in_period'][$the_period]++;
 
 
 
237
  }
238
  }
239
 
@@ -496,7 +601,7 @@ class WCJ_Reports {
496
  'on_stock' => array(
497
  'id' => 'on_stock',
498
  'title' => __( 'All Products on Stock', 'woocommerce-jetpack' ),
499
- 'desc' => __( 'Report shows all products that are on stock.', 'woocommerce-jetpack' ),
500
  ),/*
501
  'any_sale' => array(
502
  'id' => 'any_sale',
@@ -516,10 +621,13 @@ class WCJ_Reports {
516
  ),*/
517
  );
518
 
519
- echo '<h2>WooCommerce Jetpack - Smart Reports</h2>';
520
 
521
  // $this->output_submenu();
522
 
 
 
 
523
  if ( isset( $_GET['report'] ) ) {
524
 
525
  $time = microtime( true );
@@ -549,21 +657,25 @@ class WCJ_Reports {
549
 
550
  $this->output_report( $products_info, $info, $this->reports_info[$this->report] );
551
 
552
- echo 'Time Elapsed: ' . ( microtime( true ) - $time ) . 's';
553
- echo get_option( 'woocommerce_manage_stock' );
554
  }
555
  else {
556
  echo '<p>' . __( 'Here you can generate reports. Some reports are generated using all your orders and products, so if you have a lot of them - it may take a while.', 'woocommerce-jetpack' ) . '</p>';
557
  //echo '<p>' . __( 'Reports:', 'woocommerce-jetpack' ) . '</p>';
558
- echo '<table class="widefat"><tbody>';
559
- foreach ( $this->reports_info as $report => $report_info ) {
560
- //echo '<li><a href="admin.php?page=wcj-tools&tab=reports&report=' . $report . '">' . $report_info['title'] . '</a> - ' . $report_info['desc'] . '</li>';
561
- echo '<tr>';
562
- if ( ! isset( $report_info['tab'] ) || 'general' === $report_info['tab'] )
563
- echo '<td><a href="admin.php?page=wcj-tools&tab=reports&report=' . $report . '">' . $report_info['title'] . '</a></td>' . '<td>' . $report_info['desc'] . '</td>';
564
- echo '</tr>';
 
 
 
 
565
  }
566
- echo '</tbody></table>';
 
567
  }
568
  }
569
  }
5
  * The WooCommerce Jetpack Reports class.
6
  *
7
  * @class WCJ_Reports
8
+ * @version 1.2.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
22
  public function __construct() {
23
 
24
  // Main hooks
25
+ if ( 'yes' === get_option( 'wcj_reports_enabled' ) ) {
26
  if ( is_admin() ) {
27
+ //add_filter( 'wcj_tools_tabs', array( $this, 'add_reports_tool_tab' ), 100 );
28
+ //add_action( 'wcj_tools_reports', array( $this, 'create_reports_tool' ), 100 );
29
+ add_filter( 'woocommerce_admin_reports', array( $this, 'add_customers_by_country_report' ) );
30
+ add_filter( 'woocommerce_admin_reports', array( $this, 'add_all_in_stock_report' ) );
31
  }
32
  }
33
 
34
  // Settings hooks
35
  add_filter( 'wcj_settings_sections', array( $this, 'settings_section' ) ); // Add section to WooCommerce > Settings > Jetpack
36
  add_filter( 'wcj_settings_reports', array( $this, 'get_settings' ), 100 ); // Add the settings
37
+ add_filter( 'wcj_features_status', array( $this, 'add_enabled_option' ), 100 ); // Add Enable option to Jetpack Settings Dashboard
38
+ }
39
+
40
+ public function get_all_in_stock_report() {
41
+ $this->create_reports_tool();
42
  }
43
 
44
  /**
45
  * prepare_items function.
46
  */
47
  public function prepare_items() {
48
+
49
+ $eu_countries = array(
50
+ 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB',
51
+ );
52
 
53
+ if ( 'no' === get_option( 'wcj_reports_eu_as_single_country' ) )
54
+ $eu_countries = array();
55
 
56
  //$customers = get_users( 'orderby=nicename&role=customer' );
57
  $customers = get_users( 'role=customer' );
58
  // Array of WP_User objects.
59
  foreach ( $customers as $customer ) {
60
  //print_r( $user );
61
+
62
  $user_meta = get_user_meta( $customer->ID );
63
+ //echo '<pre>';
64
+ //print_r( $user_meta );
65
+ //echo '</pre>';
66
+ $billing_country = isset( $user_meta['billing_country'][0] ) ? $user_meta['billing_country'][0] : '';
67
+ $shipping_country = isset( $user_meta['shipping_country'][0] ) ? $user_meta['shipping_country'][0] : '';
68
+ $customer_country = ( '' == $billing_country ) ? $shipping_country : $billing_country;
69
+
70
+ if ( in_array( $customer_country, $eu_countries ) )
71
+ $customer_country = 'EU';
72
+
73
+ if ( '' == $customer_country )
74
+ $customer_country = 'N/A';
75
  //echo "<p>$customer_country</p>";
76
  $country_counter[ $customer_country ]++;
77
  }
78
 
79
+ //echo '<pre>';
80
+ //print_r( $country_counter );
81
+ //echo '</pre>';
82
+
83
+ //ksort( $country_counter );
84
+ arsort( $country_counter );
85
+
86
+ $total_customers = count( $customers );
87
+
88
+ $html = '<h5>' . __( 'Total customers', 'woocommerce-jetpack' ) . ': ' . $total_customers . '</h5>';
89
+
90
+
91
+
92
+
93
+
94
+ $html .= '<table class="widefat" style="width:30% !important;"><tbody>';
95
+ $html .= '<tr>';
96
+ //$html .= '<th>' . __( 'Country Flag', 'woocommerce-jetpack' ) . '</th>';
97
+ $html .= '<th></th>';
98
+ $html .= '<th>' . __( 'Country Code', 'woocommerce-jetpack' ) . '</th>';
99
+ $html .= '<th>' . __( 'Customers Count', 'woocommerce-jetpack' ) . '</th>';
100
+ $html .= '<th>' . __( 'Percent of total', 'woocommerce-jetpack' ) . '</th>';
101
+ $html .= '<th></th>';
102
+ $html .= '</tr>';
103
+ $i = 0;
104
+ foreach ( $country_counter as $country_code => $counter ) {
105
+ $html .= '<tr>';
106
+
107
+ $html .= '<td>' . ++$i . '</td>';
108
+
109
+ $html .= '<td>' . $country_code . '</td>';
110
+ $html .= '<td>' . $counter . '</td>';
111
+ if ( 0 != $total_customers )
112
+ $html .= '<td>' . number_format( ( $counter / $total_customers ) * 100, 2 ) . '%' . '</td>';
113
+ else
114
+ $html .= '<td></td>';
115
+
116
+ if ( 'N/A' != $country_code )
117
+ $html .= '<td>' . '<img src="' . plugins_url() . '/woocommerce-jetpack/assets/images/flag-icons/' . strtolower( $country_code ) . '.png">' . '</td>';
118
+ else
119
+ $html .= '<td></td>';
120
+ //$html .= '<td>' . '<img src="' . plugins_url() . '/woocommerce-jetpack/assets/images/flag-icons/europeanunion.png">' . '</td>';
121
+
122
+ $html .= '</tr>';
123
+ }
124
+ $html .= '</tbody></table>';
125
+ echo $html;
126
+
127
+ //$this->create_reports_tool();
128
+ }
129
+
130
+ /**
131
+ * Add tab to WooCommerce > Jetpack Tools.
132
+ */
133
+ public function add_all_in_stock_report( $reports ) {
134
+ $reports['stock']['reports']['all_in_stock'] = array(
135
+ 'title' => __( 'WooJetpack: All in stock (with sales info)', 'woocommerce-jetpack' ),
136
+ 'description' => '',
137
+ 'hide_title' => true,
138
+ 'callback' => array( $this, 'get_all_in_stock_report' ),
139
+ );
140
+
141
+ return $reports;
142
  }
143
 
144
  /**
145
  * Add tab to WooCommerce > Jetpack Tools.
146
  */
147
  public function add_customers_by_country_report( $reports ) {
148
+ /*$reports['wcj_reports'] = array(
149
  'title' => __( 'WooCommerce Jetpack Reports', 'woocommerce-jetpack' ),
150
  'reports' => array(
151
  'customers_by_country' => array(
152
+ 'title' => __( 'WooJetpack: Customers by Country', 'woocommerce' ),
153
  'description' => '',
154
  'hide_title' => true,
155
  'callback' => array( $this, 'get_report' ),
156
  ),
157
  ),
158
+ );*/
159
 
160
  $reports['customers']['reports']['customers_by_country'] = array(
161
+ 'title' => __( 'WooJetpack: Customers by Country', 'woocommerce-jetpack' ),
162
  'description' => '',
163
  'hide_title' => true,
164
  'callback' => array( $this, 'get_report' ),
177
  public function add_reports_tool_tab( $tabs ) {
178
  $tabs[] = array(
179
  'id' => 'reports',
180
+ 'title' => __( 'Smart Reports', 'woocommerce-jetpack' ) . ' - ' . __( '<i>BETA Version</i>', 'woocommerce-jetpack' ),
181
  );
182
  return $tabs;
183
  }
203
  array(
204
  'title' => __( 'Reports', 'woocommerce-jetpack' ),
205
  'desc' => __( 'Enable the Reports feature', 'woocommerce-jetpack' ),
206
+ 'desc_tip' => __( 'Stock, sales, customers etc. reports.', 'woocommerce-jetpack' ),
207
  'id' => 'wcj_reports_enabled',
208
  'default' => 'yes',
209
  'type' => 'checkbox'
210
  ),
211
 
212
  array( 'type' => 'sectionend', 'id' => 'wcj_reports_options' ),
213
+
214
+ array(
215
+ 'title' => __( 'Reports Options', 'woocommerce-jetpack' ),
216
+ 'type' => 'title',
217
+ 'desc' => __( 'WooJetpack: Customers by Country. Available in WooCommerce > Reports > Customers.', 'woocommerce-jetpack' ) . '<br>' .
218
+ __( 'WooJetpack: All in stock (with sales info). Available in WooCommerce > Reports > Stock.', 'woocommerce-jetpack' ),
219
+ 'id' => 'wcj_reports_more_options'
220
+ ),
221
+
222
+ array(
223
+ 'title' => __( 'European Union as single country', 'woocommerce-jetpack' ),
224
+ 'desc' => __( 'When checked all EU contries are counted as one country in all reports.', 'woocommerce-jetpack' ),
225
+ 'id' => 'wcj_reports_eu_as_single_country',
226
+ 'default' => 'no',
227
+ 'type' => 'checkbox'
228
+ ),
229
+
230
+ array( 'type' => 'sectionend', 'id' => 'wcj_reports_more_options' ),
231
  );
232
 
233
  return $settings;
237
  * Add settings section to WooCommerce > Settings > Jetpack.
238
  */
239
  function settings_section( $sections ) {
240
+ $sections['reports'] = __( 'Reports', 'woocommerce-jetpack' ) . __( ' - <em>BETA</em>', 'woocommerce-jetpack' );
241
  return $sections;
242
  }
243
 
327
  $now_time = time();
328
  $order_age = ( $now_time - $the_timestamp );
329
  $one_day_seconds = ( 24 * 60 * 60 );
330
+
331
+
332
+ $products_info_sales_in_period = $products_info[$item['product_id']]['sales_in_period'];
333
+ //echo '<pre>' . print_r( $products_info_sales_in_period, true ) . '</pre>';
334
 
335
+ if ( ! empty( $products_info_sales_in_period ) ) {
336
+
337
+ foreach ( $products_info_sales_in_period as $the_period => $the_value ) {
338
+ if ( $order_age < ( $the_period * $one_day_seconds ) ) {
339
+ $products_info[$item['product_id']]['sales_in_period'][$the_period] += $item['qty'];
340
+ //$products_info[$item['product_id']]['orders_in_period'][$the_period]++;
341
+ }
342
  }
343
  }
344
 
601
  'on_stock' => array(
602
  'id' => 'on_stock',
603
  'title' => __( 'All Products on Stock', 'woocommerce-jetpack' ),
604
+ 'desc' => __( 'Report shows all products that are on stock and some sales info.', 'woocommerce-jetpack' ),
605
  ),/*
606
  'any_sale' => array(
607
  'id' => 'any_sale',
621
  ),*/
622
  );
623
 
624
+ //echo '<h2>' . __( 'WooCommerce Jetpack - Smart Reports', 'woocommerce-jetpack' ) . '</h2>';
625
 
626
  // $this->output_submenu();
627
 
628
+ $_GET['report'] = 'on_stock';
629
+ $_GET['period'] = 90;
630
+
631
  if ( isset( $_GET['report'] ) ) {
632
 
633
  $time = microtime( true );
657
 
658
  $this->output_report( $products_info, $info, $this->reports_info[$this->report] );
659
 
660
+ //echo 'Time Elapsed: ' . ( microtime( true ) - $time ) . 's';
 
661
  }
662
  else {
663
  echo '<p>' . __( 'Here you can generate reports. Some reports are generated using all your orders and products, so if you have a lot of them - it may take a while.', 'woocommerce-jetpack' ) . '</p>';
664
  //echo '<p>' . __( 'Reports:', 'woocommerce-jetpack' ) . '</p>';
665
+ echo '<h3>' . __( 'Stock based reports', 'woocommerce-jetpack' ) . '</h3>';
666
+ if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) {
667
+ echo '<table class="widefat"><tbody>';
668
+ foreach ( $this->reports_info as $report => $report_info ) {
669
+ //echo '<li><a href="admin.php?page=wcj-tools&tab=reports&report=' . $report . '">' . $report_info['title'] . '</a> - ' . $report_info['desc'] . '</li>';
670
+ echo '<tr>';
671
+ if ( ! isset( $report_info['tab'] ) || 'general' === $report_info['tab'] )
672
+ echo '<td><a href="admin.php?page=wcj-tools&tab=reports&report=' . $report . '">' . $report_info['title'] . '</a></td>' . '<td>' . $report_info['desc'] . '</td>';
673
+ echo '</tr>';
674
+ }
675
+ echo '</tbody></table>';
676
  }
677
+ else
678
+ echo '<p>' . __( 'Please enable stock management in <strong>WooCommerce > Settings > Products > Inventory</strong> to generate stock based reports.', 'woocommerce-jetpack' ) . '</p>';
679
  }
680
  }
681
  }
includes/class-wcj-sorting.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Sorting class.
6
  *
7
  * @class WCJ_Sorting
8
- * @version 1.0.1
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
@@ -24,16 +24,19 @@ class WCJ_Sorting {
24
  // HOOKS
25
 
26
  // Main hooks
27
- if ( get_option( 'wcj_sorting_enabled' ) == 'yes' ) {
28
 
29
- add_filter( 'woocommerce_get_catalog_ordering_args', array( $this, 'custom_woocommerce_get_catalog_ordering_args' ), 100 ); // Sorting
30
- add_filter( 'woocommerce_catalog_orderby', array( $this, 'custom_woocommerce_catalog_orderby' ), 100 ); // Front end
31
- add_filter( 'woocommerce_default_catalog_orderby_options', array( $this, 'custom_woocommerce_catalog_orderby' ), 100 ); // Back end (default sorting)
32
- if ( get_option( 'wcj_sorting_remove_all_enabled' ) == 'yes' )
33
- add_action( apply_filters( 'wcj_get_option_filter', 'wcj_empty_action', 'init' ), array( $this, 'remove_sorting' ), 100 ); // Remove sorting
34
 
35
- // Settings
36
- add_filter( 'woocommerce_product_settings', array( $this, 'add_remove_sorting_checkbox' ), 100 ); // Add 'Remove All Sorting' checkbox to WooCommerce > Settings > Products
 
 
 
37
  }
38
 
39
  // Settings hooks
@@ -102,18 +105,28 @@ class WCJ_Sorting {
102
  */
103
  function custom_woocommerce_catalog_orderby( $sortby ) {
104
 
105
- if ( get_option( 'wcj_sorting_by_name_asc_enabled' ) == 'yes' )
 
106
  $sortby['title_asc'] = get_option( 'wcj_sorting_by_name_asc_text' );
107
 
108
- if ( get_option( 'wcj_sorting_by_name_desc_enabled' ) == 'yes' )
 
109
  $sortby['title_desc'] = get_option( 'wcj_sorting_by_name_desc_text' );
110
 
111
- if ( get_option( 'wcj_sorting_by_sku_asc_enabled' ) == 'yes' )
 
112
  $sortby['sku_asc'] = get_option( 'wcj_sorting_by_sku_asc_text' );
113
 
114
- if ( 'yes' == get_option( 'wcj_sorting_by_sku_desc_enabled' ) )
 
115
  $sortby['sku_desc'] = get_option( 'wcj_sorting_by_sku_desc_text' );
116
 
 
 
 
 
 
 
117
  return $sortby;
118
  }
119
 
@@ -130,26 +143,36 @@ class WCJ_Sorting {
130
  $orderby = esc_attr( $orderby_value[0] );
131
 
132
  switch ( $orderby ) :
133
- case 'title_asc' :
134
  $args['orderby'] = 'title';
135
  $args['order'] = 'asc';
136
  $args['meta_key'] = '';
137
  break;
138
- case 'title_desc' :
139
  $args['orderby'] = 'title';
140
  $args['order'] = 'desc';
141
  $args['meta_key'] = '';
142
  break;
143
- case 'sku_asc' :
144
  $args['orderby'] = 'meta_value';
145
  $args['order'] = 'asc';
146
  $args['meta_key'] = '_sku';
147
  break;
148
- case 'sku_desc' :
149
  $args['orderby'] = 'meta_value';
150
  $args['order'] = 'desc';
151
  $args['meta_key'] = '_sku';
152
  break;
 
 
 
 
 
 
 
 
 
 
153
  endswitch;
154
 
155
  return $args;
@@ -191,79 +214,75 @@ class WCJ_Sorting {
191
  array( 'type' => 'sectionend', 'id' => 'wcj_remove_all_sorting_options' ),
192
 
193
  array( 'title' => __( 'Add More Sorting', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => '', 'id' => 'wcj_more_sorting_options' ),
 
 
 
 
 
 
 
 
194
 
195
  array(
196
- 'title' => __( 'Sort by Name - Asc', 'woocommerce-jetpack' ),
197
- 'desc' => __( 'Text visible at front end', 'woocommerce-jetpack' ),
 
198
  'id' => 'wcj_sorting_by_name_asc_text',
199
- 'default' => 'Sort: A to Z',
200
  'type' => 'text',
201
  'css' => 'min-width:300px;',
202
  ),
203
-
204
- array(
205
- 'title' => __( '', 'woocommerce-jetpack' ),
206
- 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
207
- //'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
208
- 'id' => 'wcj_sorting_by_name_asc_enabled',
209
- 'default' => 'yes',
210
- 'type' => 'checkbox',
211
- ),
212
 
213
  array(
214
- 'title' => __( 'Sort by Name - Desc', 'woocommerce-jetpack' ),
215
- 'desc' => __( 'Text visible at front end', 'woocommerce-jetpack' ),
 
216
  'id' => 'wcj_sorting_by_name_desc_text',
217
- 'default' => 'Sort: Z to A',
218
  'type' => 'text',
219
  'css' => 'min-width:300px;',
220
  ),
221
 
222
  array(
223
- 'title' => __( '', 'woocommerce-jetpack' ),
224
- 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
225
- //'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
226
- 'id' => 'wcj_sorting_by_name_desc_enabled',
227
- 'default' => 'yes',
228
- 'type' => 'checkbox',
229
- ),
230
-
231
- array(
232
- 'title' => __( 'Sort by SKU - Asc', 'woocommerce-jetpack' ),
233
- 'desc' => __( 'Text visible at front end', 'woocommerce-jetpack' ),
234
  'id' => 'wcj_sorting_by_sku_asc_text',
235
- 'default' => 'Sort: SKU (asc)',
236
  'type' => 'text',
237
  'css' => 'min-width:300px;',
238
  ),
239
 
240
  array(
241
- 'title' => __( '', 'woocommerce-jetpack' ),
242
- 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
243
- //'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
244
- 'id' => 'wcj_sorting_by_sku_asc_enabled',
245
- 'default' => 'yes',
246
- 'type' => 'checkbox',
247
- ),
248
-
249
- array(
250
- 'title' => __( 'Sort by SKU - Desc', 'woocommerce-jetpack' ),
251
- 'desc' => __( 'Text visible at front end', 'woocommerce-jetpack' ),
252
  'id' => 'wcj_sorting_by_sku_desc_text',
253
- 'default' => 'Sort: SKU (desc)',
254
  'type' => 'text',
255
  'css' => 'min-width:300px;',
256
  ),
257
 
258
  array(
259
- 'title' => __( '', 'woocommerce-jetpack' ),
260
- 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
261
- //'desc_tip' => __( 'Check to enable.', 'woocommerce-jetpack' ),
262
- 'id' => 'wcj_sorting_by_sku_desc_enabled',
263
- 'default' => 'yes',
264
- 'type' => 'checkbox',
 
265
  ),
266
 
 
 
 
 
 
 
 
 
 
 
267
  array( 'type' => 'sectionend', 'id' => 'wcj_more_sorting_options' ),
268
  );
269
 
5
  * The WooCommerce Jetpack Sorting class.
6
  *
7
  * @class WCJ_Sorting
8
+ * @version 1.2.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
24
  // HOOKS
25
 
26
  // Main hooks
27
+ if ( 'yes' === get_option( 'wcj_sorting_enabled' ) ) {
28
 
29
+ if ( 'yes' === get_option( 'wcj_more_sorting_enabled' ) ) {
30
+ add_filter( 'woocommerce_get_catalog_ordering_args', array( $this, 'custom_woocommerce_get_catalog_ordering_args' ), 100 ); // Sorting
31
+ add_filter( 'woocommerce_catalog_orderby', array( $this, 'custom_woocommerce_catalog_orderby' ), 100 ); // Front end
32
+ add_filter( 'woocommerce_default_catalog_orderby_options', array( $this, 'custom_woocommerce_catalog_orderby' ), 100 ); // Back end (default sorting)
33
+ }
34
 
35
+ if ( 'yes' === get_option( 'wcj_sorting_remove_all_enabled' ) ) {
36
+ add_action( apply_filters( 'wcj_get_option_filter', 'wcj_empty_action', 'init' ), array( $this, 'remove_sorting' ), 100 ); // Remove sorting
37
+ // Settings
38
+ add_filter( 'woocommerce_product_settings', array( $this, 'add_remove_sorting_checkbox' ), 100 ); // Add 'Remove All Sorting' checkbox to WooCommerce > Settings > Products
39
+ }
40
  }
41
 
42
  // Settings hooks
105
  */
106
  function custom_woocommerce_catalog_orderby( $sortby ) {
107
 
108
+ //if ( get_option( 'wcj_sorting_by_name_asc_enabled' ) == 'yes' )
109
+ if ( '' != get_option( 'wcj_sorting_by_name_asc_text' ) )
110
  $sortby['title_asc'] = get_option( 'wcj_sorting_by_name_asc_text' );
111
 
112
+ //if ( get_option( 'wcj_sorting_by_name_desc_enabled' ) == 'yes' )
113
+ if ( '' != get_option( 'wcj_sorting_by_name_desc_text' ) )
114
  $sortby['title_desc'] = get_option( 'wcj_sorting_by_name_desc_text' );
115
 
116
+ //if ( get_option( 'wcj_sorting_by_sku_asc_enabled' ) == 'yes' )
117
+ if ( '' != get_option( 'wcj_sorting_by_sku_asc_text' ) )
118
  $sortby['sku_asc'] = get_option( 'wcj_sorting_by_sku_asc_text' );
119
 
120
+ //if ( 'yes' == get_option( 'wcj_sorting_by_sku_desc_enabled' ) )
121
+ if ( '' != get_option( 'wcj_sorting_by_sku_desc_text' ) )
122
  $sortby['sku_desc'] = get_option( 'wcj_sorting_by_sku_desc_text' );
123
 
124
+ if ( '' != get_option( 'wcj_sorting_by_stock_quantity_asc_text' ) )
125
+ $sortby['stock_quantity_asc'] = get_option( 'wcj_sorting_by_stock_quantity_asc_text' );
126
+
127
+ if ( '' != get_option( 'wcj_sorting_by_stock_quantity_desc_text' ) )
128
+ $sortby['stock_quantity_desc'] = get_option( 'wcj_sorting_by_stock_quantity_desc_text' );
129
+
130
  return $sortby;
131
  }
132
 
143
  $orderby = esc_attr( $orderby_value[0] );
144
 
145
  switch ( $orderby ) :
146
+ case 'title_asc':
147
  $args['orderby'] = 'title';
148
  $args['order'] = 'asc';
149
  $args['meta_key'] = '';
150
  break;
151
+ case 'title_desc':
152
  $args['orderby'] = 'title';
153
  $args['order'] = 'desc';
154
  $args['meta_key'] = '';
155
  break;
156
+ case 'sku_asc':
157
  $args['orderby'] = 'meta_value';
158
  $args['order'] = 'asc';
159
  $args['meta_key'] = '_sku';
160
  break;
161
+ case 'sku_desc':
162
  $args['orderby'] = 'meta_value';
163
  $args['order'] = 'desc';
164
  $args['meta_key'] = '_sku';
165
  break;
166
+ case 'stock_quantity_asc':
167
+ $args['orderby'] = 'meta_value';
168
+ $args['order'] = 'asc';
169
+ $args['meta_key'] = '_stock';
170
+ break;
171
+ case 'stock_quantity_desc':
172
+ $args['orderby'] = 'meta_value';
173
+ $args['order'] = 'desc';
174
+ $args['meta_key'] = '_stock';
175
+ break;
176
  endswitch;
177
 
178
  return $args;
214
  array( 'type' => 'sectionend', 'id' => 'wcj_remove_all_sorting_options' ),
215
 
216
  array( 'title' => __( 'Add More Sorting', 'woocommerce-jetpack' ), 'type' => 'title', 'desc' => '', 'id' => 'wcj_more_sorting_options' ),
217
+
218
+ array(
219
+ 'title' => __( 'Add More Sorting', 'woocommerce-jetpack' ),
220
+ 'desc' => __( 'Enable', 'woocommerce-jetpack' ),
221
+ 'id' => 'wcj_more_sorting_enabled',
222
+ 'default' => 'yes',
223
+ 'type' => 'checkbox'
224
+ ),
225
 
226
  array(
227
+ 'title' => __( 'Sort by Name', 'woocommerce-jetpack' ),
228
+ 'desc' => __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Sort by title: A to Z', 'woocommerce-jetpack' ),
229
+ 'desc_tip' => __( 'Text to show on frontend. Leave blank to disable.', 'woocommerce-jetpack' ),
230
  'id' => 'wcj_sorting_by_name_asc_text',
231
+ 'default' => __( 'Sort by title: A to Z', 'woocommerce-jetpack' ),
232
  'type' => 'text',
233
  'css' => 'min-width:300px;',
234
  ),
 
 
 
 
 
 
 
 
 
235
 
236
  array(
237
+ 'title' => '',//'title' => __( 'Sort by Name - Desc', 'woocommerce-jetpack' ),
238
+ 'desc' => __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Sort by title: Z to A', 'woocommerce-jetpack' ),
239
+ 'desc_tip' => __( 'Text to show on frontend. Leave blank to disable.', 'woocommerce-jetpack' ),
240
  'id' => 'wcj_sorting_by_name_desc_text',
241
+ 'default' => __( 'Sort by title: Z to A', 'woocommerce-jetpack' ),
242
  'type' => 'text',
243
  'css' => 'min-width:300px;',
244
  ),
245
 
246
  array(
247
+ 'title' => __( 'Sort by SKU', 'woocommerce-jetpack' ),
248
+ 'desc' => __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Sort by SKU: low to high', 'woocommerce-jetpack' ),
249
+ 'desc_tip' => __( 'Text to show on frontend. Leave blank to disable.', 'woocommerce-jetpack' ),
 
 
 
 
 
 
 
 
250
  'id' => 'wcj_sorting_by_sku_asc_text',
251
+ 'default' => __( 'Sort by SKU: low to high', 'woocommerce-jetpack' ),
252
  'type' => 'text',
253
  'css' => 'min-width:300px;',
254
  ),
255
 
256
  array(
257
+ 'title' => '',//'title' => __( 'Sort by SKU - Desc', 'woocommerce-jetpack' ),
258
+ 'desc' => __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Sort by SKU: high to low', 'woocommerce-jetpack' ),
259
+ 'desc_tip' => __( 'Text to show on frontend. Leave blank to disable.', 'woocommerce-jetpack' ),
 
 
 
 
 
 
 
 
260
  'id' => 'wcj_sorting_by_sku_desc_text',
261
+ 'default' => __( 'Sort by SKU: high to low', 'woocommerce-jetpack' ),
262
  'type' => 'text',
263
  'css' => 'min-width:300px;',
264
  ),
265
 
266
  array(
267
+ 'title' => __( 'Sort by stock quantity', 'woocommerce-jetpack' ),
268
+ 'desc' => __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Sort by stock quantity: low to high', 'woocommerce-jetpack' ),
269
+ 'desc_tip' => __( 'Text to show on frontend. Leave blank to disable.', 'woocommerce-jetpack' ),
270
+ 'id' => 'wcj_sorting_by_stock_quantity_asc_text',
271
+ 'default' => __( 'Sort by stock quantity: low to high', 'woocommerce-jetpack' ),
272
+ 'type' => 'text',
273
+ 'css' => 'min-width:300px;',
274
  ),
275
 
276
+ array(
277
+ 'title' => '',
278
+ 'desc' => __( 'Default: ', 'woocommerce-jetpack' ) . __( 'Sort by stock quantity: high to low', 'woocommerce-jetpack' ),
279
+ 'desc_tip' => __( 'Text to show on frontend. Leave blank to disable.', 'woocommerce-jetpack' ),
280
+ 'id' => 'wcj_sorting_by_stock_quantity_desc_text',
281
+ 'default' => __( 'Sort by stock quantity: high to low', 'woocommerce-jetpack' ),
282
+ 'type' => 'text',
283
+ 'css' => 'min-width:300px;',
284
+ ),
285
+
286
  array( 'type' => 'sectionend', 'id' => 'wcj_more_sorting_options' ),
287
  );
288
 
includes/js/checkout.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ jQuery( function( $ ) {
2
+ // Define that JavaScript code should be executed in "strict mode"
3
+ "use strict";
4
+ // Trigger WooCommerce's `update_checkout` function, when customer changes payment method
5
+ $('body').on('change', 'input[name="payment_method"]', function() {
6
+ $('body').trigger('update_checkout');
7
+ });
8
+ });
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WooCommerce Jetpack ===
2
  Contributors: algoritmika
3
  Donate link: http://algoritmika.com/donate/
4
- Tags: woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales,custom product tabs,remove product tab,
5
  Requires at least: 3.9.1
6
  Tested up to: 4.0
7
- Stable tag: 1.8.2
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -15,20 +15,21 @@ Supercharge your WordPress WooCommerce site with these awesome powerful features
15
  WooCommerce Jetpack is a WordPress plugin that supercharges your site with awesome powerful features. Features are absolutely required for anyone using excellent WordPress WooCommerce platform.
16
 
17
  = Features =
18
-
19
  * Custom Price Labels - Create any custom price label for any product.
20
- * Call for Price - Create any custom price label, like "Call for price", for all products with empty price.
21
  * Currencies - Add all world currencies, change currency symbol.
22
- * PDF Invoices - Add PDF invoices for store owners and for customers. Automatically email PDF invoices to customers.
23
- * Orders - Sequential order numbering, custom order number prefix and number width. Set minimum order amount.
24
  * More Sorting Options - Add more sorting options or remove sorting at all (including WooCommerce default).
25
- * Payment Gateways - Add and customize up to 10 additional custom off-line payment gateways. Change icons (images) for all default (COD - Cash on Delivery, Cheque, BACS, Mijireh Checkout, PayPal) WooCommerce payment gateways.
 
 
26
  * Checkout - Customize checkout fields: disable/enable fields, set required, change labels and/or placeholders.
27
  * Shipping - Hide shipping when free is available.
28
  * Emails - Add another email recipient(s) to all WooCommerce emails.
29
  * Product Listings - Change display options for shop and category pages: show/hide categories count, exclude categories, show/hide empty categories.
30
  * Product Info - Add more info to product on category or single pages. Change related products number.
31
- * Product Tabs - Add custom product tabs - globally or per product. Customize or completely remove WooCommerce default product tabs.
32
  * Cart - Add "Empty Cart" button to cart page, automatically add product to cart on visit.
33
  * Add to Cart - Change text for add to cart buttons for each product type. Display "Product already in cart" instead of "Add to cart" button. Redirect add to cart button to any url (e.g. checkout page).
34
  * Old Slugs - Remove old product slugs.
@@ -70,23 +71,24 @@ Please let us know if you want anything added to list by <a href="http://woojetp
70
  If you wish that some task would go up the queue to make it faster, please contact us by <a href="http://woojetpack.com/contact-us/">filling this form</a>. We are listening carefully to our users!
71
 
72
  = The list =
73
-
74
- * Upgrade Feature - PDF Invoices - Make emailing PDF as attachment option available for certain payment methods only (user selection). Idea by Jen.
 
 
 
75
  * Upgrade Feature - PDF Invoices - Sending invoice on customer's request. Idea by Jen.
76
- * Upgrade Feature - PDF Invoices - Bilingual invoice. Idea by Tudor Mateescu.
77
- * Upgrade Feature - PDF Invoices - Second currency in invoice. Idea by Tudor Mateescu.
78
- * Upgrade Feature - Shipping - Advance free shipping - Free shipping for multiple country/places. Each country/places different prices. Idea by LQTOYS.
 
79
  * New Feature - Checkout to PDF (wish list). Idea by Mick.
80
- * Upgrade Feature - Checkout - Extra fee (e.g. for PayPal). Idea by Daniele.
81
- * Product Info on Archive Pages option within WooJetpack to list the different colour variations of a product on the category sections. Idea by Tony.
82
- * New Feature - Custom Product Input Fields - Fields to fill before adding product to cart. Idea by Mangesh.
83
  * Upgrade Feature - PDF Invoices - Shipping labels. Suggested by Glenda.
84
  * New Feature - Different prices for different countries. Suggested by Illona.
85
- * New Feature - Add second currency to the price.
86
- * New Feature - Smart Reports - Various reports based on products prices, sales, stock, customers.
87
  * New Feature - Set SKUs as product IDs.
 
88
  * New Feature - Products per Page - Add "products per page" option for customers (i.e. front end).
89
- * Upgrade Feature - Shipping - Add "Custom Shipping Method".
90
  * Upgrade Feature - PDF Invoices - Separate numbering for invoices option, then can add `add_order_number_to_invoice` option.
91
  * Upgrade Feature - Custom Price Labels - Add price countdown.
92
  * Upgrade Feature - Product Info - Add widget.
@@ -102,11 +104,40 @@ If you wish that some task would go up the queue to make it faster, please conta
102
  * Upgrade Feature - Checkout - Custom checkout fields.
103
  * Upgrade Feature - Orders - Maximum weight - "Contact us" to place order with products total weight over some amount.
104
  * Upgrade Feature - Sorting - Add sorting by popularity in e.g. 90 days (not by `total_sales` as it is by default in WooCommerce).
 
 
 
 
 
 
 
105
 
106
  == Changelog ==
107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  = 1.8.2 - 01/11/2014 =
109
- * Fix - Orders - Custom Order Statuses - Bug causing fail on changing status with slug more that 17 characters, fixed. Reported by Patryk.
110
  * Fix - Product Tabs - Priority was not working in custom local tabs, fixed.
111
  Also added default priority in custom local product tabs.
112
  * Fix - *Settings* link in *WooCommerce > Jetpack Settings* was wrong, fixed.
@@ -114,21 +145,21 @@ If you wish that some task would go up the queue to make it faster, please conta
114
  * Fix - Product Tabs - Wrong default priority for WooCommerce Standard Product Tabs, fixed.
115
  *Reviews Tab* priority was 20 (wrong), changed to 30 (good), *Additional Information Tab* 30 and 20 accordingly. Reported by Patryk.
116
  * Feature Upgraded - Product Info - Major upgrade: added new info options with separate lines.
117
- Also added about 20 new short codes, including:
118
- %price%, %price_excluding_tax% (suggested by Josh),
119
- %stock_availability% (by https://wordpress.org/support/topic/custom-tabs-1),
120
  %time_since_last_sale%, %weight%, %list_attributes% etc.
121
- For full list of short codes, please visit http://woojetpack.com/features/product-info/
122
- * Feature Upgraded - Product Listings - Option to change default WooCommece behavior on displaying all products if none categories are dispalyed.
123
  Now it's possible to disable displaying the products. Suggested by Xavier.
124
- * Feature Upgraded - PDF Invoices - Order date and time added. Suggested by https://wordpress.org/support/topic/order-time
125
 
126
  = 1.8.1 - 24/10/2014 =
127
  * Fix - PDF Invoices - Variation(s) name was not showing in invoice, fixed.
128
  Reported by https://wordpress.org/support/topic/item-description
129
  * Feature Upgraded - PDF Invoices - Now shortcodes are displayed in invoice's additional header and footer.
130
  Idea by https://wordpress.org/support/topic/displaying-short-codes
131
- * Feature Upgraded - PDF Invoices - Additional header option added.
132
  * Feature Upgraded - PDF Invoices - *Item Name Additional Info* (e.g. SKU) option added to invoice.
133
  Idea by https://wordpress.org/support/topic/item-description
134
 
@@ -329,10 +360,10 @@ If you wish that some task would go up the queue to make it faster, please conta
329
  == Upgrade Notice ==
330
 
331
  = 1.7.7 =
332
- Bug causing setting checkboxes back to *on*, fixed. Upgrade immediately.
333
 
334
  = 1.7.6 =
335
- Bug causing setting all product's checkbox labels to off, fixed. Upgrade immediately.
336
 
337
  = 1.7.1 =
338
  Bug causing "PHP Parse error" (reported on servers running PHP 5.3) fixed. Upgrade immediately.
1
  === WooCommerce Jetpack ===
2
  Contributors: algoritmika
3
  Donate link: http://algoritmika.com/donate/
4
+ Tags: woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales,custom product tabs,remove product tab,payment gateway fee,
5
  Requires at least: 3.9.1
6
  Tested up to: 4.0
7
+ Stable tag: 1.9.0
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
15
  WooCommerce Jetpack is a WordPress plugin that supercharges your site with awesome powerful features. Features are absolutely required for anyone using excellent WordPress WooCommerce platform.
16
 
17
  = Features =
 
18
  * Custom Price Labels - Create any custom price label for any product.
19
+ * Call for Price - Create any custom price label, like *Call for price*, for all products with empty price.
20
  * Currencies - Add all world currencies, change currency symbol.
21
+ * PDF Invoices - Add PDF invoices for store owners and for customers. Automatically email PDF invoices to customers (and limit attaching invoice to selected payment gateways only).
22
+ * Orders - Sequential order numbering, custom order number prefix, date prefix, suffix and number width. Set minimum order amount.
23
  * More Sorting Options - Add more sorting options or remove sorting at all (including WooCommerce default).
24
+ * Payment Gateways - Add and customize up to 10 additional custom off-line payment gateways.
25
+ Change icons (images) for all custom and/or default (COD - Cash on Delivery, Cheque, BACS, Mijireh Checkout, PayPal) WooCommerce payment gateways.
26
+ Add payment gateways fees to any custom and/or default gateway.
27
  * Checkout - Customize checkout fields: disable/enable fields, set required, change labels and/or placeholders.
28
  * Shipping - Hide shipping when free is available.
29
  * Emails - Add another email recipient(s) to all WooCommerce emails.
30
  * Product Listings - Change display options for shop and category pages: show/hide categories count, exclude categories, show/hide empty categories.
31
  * Product Info - Add more info to product on category or single pages. Change related products number.
32
+ * Product Tabs - Add custom product tabs - globally, per category or per product. Customize or completely remove WooCommerce default product tabs.
33
  * Cart - Add "Empty Cart" button to cart page, automatically add product to cart on visit.
34
  * Add to Cart - Change text for add to cart buttons for each product type. Display "Product already in cart" instead of "Add to cart" button. Redirect add to cart button to any url (e.g. checkout page).
35
  * Old Slugs - Remove old product slugs.
71
  If you wish that some task would go up the queue to make it faster, please contact us by <a href="http://woojetpack.com/contact-us/">filling this form</a>. We are listening carefully to our users!
72
 
73
  = The list =
74
+ * Reported bug in `Empty cart` feature. Checking on our test site didn't show any problems. Reported by Patryk.
75
+ * Upgrade Feature - Shipping - Add "Custom Shipping Method".
76
+ Advance free shipping - Free shipping for multiple country/places. Each country/places different prices. Idea by LQTOYS.
77
+ * New Feature - Custom Product Input Fields - Fields to fill before adding product to cart. Idea by Mangesh.
78
+ * Upgrade Feature - Orders - Order Numbers - Custom order number date suffix. Idea by Patryk.
79
  * Upgrade Feature - PDF Invoices - Sending invoice on customer's request. Idea by Jen.
80
+ This modification will consist also of **Checkout** feature upgrade, as sending invoice on customer's request will require custom checkout fields.
81
+ Additional (custom) checkout fields idea by Tom.
82
+ * Upgrade Feature - PDF Invoices - Bilingual invoice. Idea by Tudor.
83
+ * Upgrade Feature - PDF Invoices - Second currency in invoice. Idea by Tudor.
84
  * New Feature - Checkout to PDF (wish list). Idea by Mick.
 
 
 
85
  * Upgrade Feature - PDF Invoices - Shipping labels. Suggested by Glenda.
86
  * New Feature - Different prices for different countries. Suggested by Illona.
87
+ * New Feature - Facebook like and share buttons. Idea by Kristof.
88
+ * My account page customization. Idea by Adeyemi.
89
  * New Feature - Set SKUs as product IDs.
90
+ * New Feature - Add second currency to the price (i.e. display multiple currencies).
91
  * New Feature - Products per Page - Add "products per page" option for customers (i.e. front end).
 
92
  * Upgrade Feature - PDF Invoices - Separate numbering for invoices option, then can add `add_order_number_to_invoice` option.
93
  * Upgrade Feature - Custom Price Labels - Add price countdown.
94
  * Upgrade Feature - Product Info - Add widget.
104
  * Upgrade Feature - Checkout - Custom checkout fields.
105
  * Upgrade Feature - Orders - Maximum weight - "Contact us" to place order with products total weight over some amount.
106
  * Upgrade Feature - Sorting - Add sorting by popularity in e.g. 90 days (not by `total_sales` as it is by default in WooCommerce).
107
+ * Dev - Product info - On "Home Page".
108
+ * Dev - Reports - Stock buy price.
109
+ * Dev - Two Companies - Idea by Ireneusz.
110
+ * Dev - Add to cart. Idea by Craig.
111
+ * Dev - Second currency in shop (i.e. display different currency depending on product). Idea by Leon.
112
+ * Dev - Product Info - Related Products Options: 3+ requires additional css code. Suggested by Patryk.
113
+ * Dev - PDF Invoices - Use shortcodes for template.
114
 
115
  == Changelog ==
116
 
117
+ = 1.9.0 - 10/11/2014 =
118
+ * Feature Upgraded - **Payment Gateways** - Payment Gateways Fees, added. Idea by Daniele.
119
+ Also made changes to *PDF Invoices* - fees now displayed in invoice.
120
+ * Feature Upgraded - **Product Tabs** - Options added for: hiding global tabs for an products and/or categories list. Idea by Gary.
121
+ Another similar option added: show global tab *only* for products and/or categories list.
122
+ * Feature Upgraded - **Sorting** - Sorting products by stock quantity, added. Idea by Fred.
123
+ * Feature Upgraded - **PDF Invoices** - Emailing PDF as attachment for selected payment methods only option added. Idea by Jen.
124
+ * Feature Upgraded - **PDF Invoices** - Option to add shipping address to the invoice, added. Idea by Justine.
125
+ * Feature Upgraded - **Orders** - Order Numbers - Custom order number suffix added. Idea by Patryk.
126
+ * Feature Upgraded - **Add to Cart** - Changing *add to cart* button text for products with zero and/or empty price (suggested by Patryk) option added.
127
+ Products with *zero price* are covered for archive (category) and single views.
128
+ Products with *empty price* only for archives (single view does not contain add to cart button at all, so nothing to cover).
129
+ * Feature Upgraded - **Product Info** - Added `[wcjp_list_attribute]` shortcode.
130
+ Now it is possible to display product's attribute values list (e.g. to list the different colour variations of a product). Idea by Tony.
131
+ This is the way to display product info, so WooJetpack shortcodes (introduced in v.1.8.2) are depreciated and will be removed in feature releases.
132
+ Shortcode has `visibility` parameter which gives the possibility to show shortcode's product info to admin only.
133
+ * Feature Upgraded - **Product Info** - `%stock_quantity%` WooJetpack Shortcode added.
134
+ * Dev - **Product Info** - `the_content` filter added to result. Now shortcodes will be displayed properly.
135
+ * Tweak - **Add to Cart** - Removed *enable* checkboxes in admin settings. Now need to leave the value empty to disable.
136
+ * Tweak - Added some info to *Old Slugs*, *Custom Statuses* and *Product Tabs* features. Suggested by Patryk.
137
+ * New Feature - **Reports** - Various sales, stock, customers etc. reports. *BETA* version.
138
+
139
  = 1.8.2 - 01/11/2014 =
140
+ * Fix - Orders - Custom Order Statuses - Bug causing fail on changing status with slug more that 17 characters, fixed by adding length check on adding custom status. Reported by Patryk.
141
  * Fix - Product Tabs - Priority was not working in custom local tabs, fixed.
142
  Also added default priority in custom local product tabs.
143
  * Fix - *Settings* link in *WooCommerce > Jetpack Settings* was wrong, fixed.
145
  * Fix - Product Tabs - Wrong default priority for WooCommerce Standard Product Tabs, fixed.
146
  *Reviews Tab* priority was 20 (wrong), changed to 30 (good), *Additional Information Tab* 30 and 20 accordingly. Reported by Patryk.
147
  * Feature Upgraded - Product Info - Major upgrade: added new info options with separate lines.
148
+ Also added about 20 new WooJetpack Shortcodes, including:
149
+ %price%, %price_excluding_tax% (suggested by Josh),
150
+ %stock_availability% (by https://wordpress.org/support/topic/custom-tabs-1),
151
  %time_since_last_sale%, %weight%, %list_attributes% etc.
152
+ For full list of short codes, please visit http://woojetpack.com/features/product-info/
153
+ * Feature Upgraded - Product Listings - Option to change default WooCommece behavior on displaying all products if none categories are dispalyed.
154
  Now it's possible to disable displaying the products. Suggested by Xavier.
155
+ * Feature Upgraded - PDF Invoices - Order date and time added. Suggested by https://wordpress.org/support/topic/order-time
156
 
157
  = 1.8.1 - 24/10/2014 =
158
  * Fix - PDF Invoices - Variation(s) name was not showing in invoice, fixed.
159
  Reported by https://wordpress.org/support/topic/item-description
160
  * Feature Upgraded - PDF Invoices - Now shortcodes are displayed in invoice's additional header and footer.
161
  Idea by https://wordpress.org/support/topic/displaying-short-codes
162
+ * Feature Upgraded - PDF Invoices - Additional header option added.
163
  * Feature Upgraded - PDF Invoices - *Item Name Additional Info* (e.g. SKU) option added to invoice.
164
  Idea by https://wordpress.org/support/topic/item-description
165
 
360
  == Upgrade Notice ==
361
 
362
  = 1.7.7 =
363
+ Bug in **Custom Price Labels** feature causing setting checkboxes back to *on*, fixed. Upgrade immediately.
364
 
365
  = 1.7.6 =
366
+ Bug in **Custom Price Labels** feature causing setting all product's checkbox labels to *off*, fixed. Upgrade immediately.
367
 
368
  = 1.7.1 =
369
  Bug causing "PHP Parse error" (reported on servers running PHP 5.3) fixed. Upgrade immediately.
woocommerce-jetpack.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WooCommerce Jetpack
4
  Plugin URI: http://woojetpack.com
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
- Version: 1.8.2
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.
@@ -179,7 +179,7 @@ final class WC_Jetpack {
179
  $settings[] = include_once( 'includes/class-wcj-orders.php' );
180
  $settings[] = include_once( 'includes/class-wcj-emails.php' );
181
  $settings[] = include_once( 'includes/class-wcj-pdf-invoices.php' );
182
- //$settings[] = include_once( 'includes/class-wcj-reports.php' );
183
  $settings[] = include_once( 'includes/class-wcj-old-slugs.php' );
184
 
185
  // Add options
3
  Plugin Name: WooCommerce Jetpack
4
  Plugin URI: http://woojetpack.com
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
+ Version: 1.9.0
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.
179
  $settings[] = include_once( 'includes/class-wcj-orders.php' );
180
  $settings[] = include_once( 'includes/class-wcj-emails.php' );
181
  $settings[] = include_once( 'includes/class-wcj-pdf-invoices.php' );
182
+ $settings[] = include_once( 'includes/class-wcj-reports.php' );
183
  $settings[] = include_once( 'includes/class-wcj-old-slugs.php' );
184
 
185
  // Add options