t){var c=t-n;return r.push(String(a).slice(0,c)),r}r.push(a),n=i}return e}var xd=function(e){var n=e.enabledMeasure,r=e.children,o=e.text,a=e.width,c=e.rows,l=e.onEllipsis,s=p(i.useState([0,0,0]),2),u=s[0],f=s[1],d=p(i.useState(0),2),v=d[0],m=d[1],h=p(u,3),g=h[0],y=h[1],b=h[2],w=p(i.useState(0),2),x=w[0],E=w[1],C=i.useRef(null),k=i.useRef(null),O=i.useMemo((function(){return wn(o)}),[o]),P=i.useMemo((function(){return function(e){var t=0;return e.forEach((function(e){bd(e)?t+=String(e).length:t+=1})),t}(O)}),[O]),N=i.useMemo((function(){return n&&3===v?r(wd(O,y),y1&&Pe,Ae=function(e){var t;se(!0),null===(t=xe.onExpand)||void 0===t||t.call(xe,e)},Te=p(i.useState(0),2),_e=Te[0],Re=Te[1],Fe=function(e){var t;de(e),fe!==e&&(null===(t=xe.onEllipsis)||void 0===t||t.call(xe,e))};i.useEffect((function(){var e=T.current;if(we&&Pe&&e){var t=Me?e.offsetHeight4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0,l=o>0?90+o/2:-90,s=2*Math.PI*e,u=s*((360-o)/360),f=t/100*360*((360-o)/360),d=0===o?0:{bottom:0,top:180,left:90,right:-90}[a],p=(100-n)/100*u;return"round"===i&&100!==n&&(p+=c/2)>=u&&(p=u-.01),{stroke:"string"==typeof r?r:void 0,strokeDasharray:"".concat(u,"px ").concat(s),strokeDashoffset:p,transform:"rotate(".concat(l+f+d,"deg)"),transformOrigin:"50% 50%",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},ep=function(e){var n,r=e.id,o=e.prefixCls,a=e.strokeWidth,c=e.trailWidth,l=e.gapDegree,s=e.gapPosition,u=e.trailColor,f=e.strokeLinecap,d=e.style,m=e.className,g=e.strokeColor,b=e.percent,w=v(e,Xd),x=function(e){var t=p(i.useState(),2),n=t[0],r=t[1];return i.useEffect((function(){var e;r("rc_progress_".concat((Gd?(e=Yd,Yd+=1):e="TEST_OR_SSR",e)))}),[]),e||n}(r),E="".concat(x,"-gradient"),C=50-a/2,k=Jd(C,0,100,u,l,s,f,a),O=Zd(b),P=Zd(g),N=P.find((function(e){return e&&"object"===y(e)})),S=Kd();return i.createElement("svg",t({className:h()("".concat(o,"-circle"),m),viewBox:"0 0 ".concat(100," ").concat(100),style:d,id:r},w),N&&i.createElement("defs",null,i.createElement("linearGradient",{id:E,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(N).sort((function(e,t){return Qd(e)-Qd(t)})).map((function(e,t){return i.createElement("stop",{key:t,offset:e,stopColor:N[e]})})))),i.createElement("circle",{className:"".concat(o,"-circle-trail"),r:C,cx:50,cy:50,stroke:u,strokeLinecap:f,strokeWidth:c||a,style:k}),(n=0,O.map((function(e,t){var r=P[t]||P[P.length-1],c=r&&"object"===y(r)?"url(#".concat(E,")"):void 0,u=Jd(C,n,e,r,l,s,f,a);return n+=e,i.createElement("circle",{key:t,className:"".concat(o,"-circle-path"),r:C,cx:50,cy:50,stroke:c,strokeLinecap:f,strokeWidth:a,opacity:0===e?0:1,style:u,ref:function(e){S[t]=e}})})).reverse()))};ep.defaultProps=Ud,ep.displayName="Circle";var tp=ep;function np(e){return!e||e<0?0:e>100?100:e}function rp(e){var t=e.success,n=e.successPercent;return t&&"progress"in t&&(n=t.progress),t&&"percent"in t&&(n=t.percent),n}var op=function(e){var t,n,o,a=e.prefixCls,c=e.width,l=e.strokeWidth,s=e.trailColor,u=void 0===s?null:s,f=e.strokeLinecap,d=void 0===f?"round":f,p=e.gapPosition,v=e.gapDegree,m=e.type,g=e.children,y=e.success,b=c||120,w={width:b,height:b,fontSize:.15*b+6},x=l||6,E=p||"dashboard"===m&&"bottom"||void 0,C="[object Object]"===Object.prototype.toString.call(e.strokeColor),k=function(e){var t=e.success,n=e.strokeColor;return[(void 0===t?{}:t).strokeColor||K.green,n||null]}({success:y,strokeColor:e.strokeColor}),O=h()("".concat(a,"-inner"),r({},"".concat(a,"-circle-gradient"),C));return i.createElement("div",{className:O,style:w},i.createElement(tp,{percent:(t=e,n=t.percent,o=np(rp({success:t.success,successPercent:t.successPercent})),[o,np(np(n)-o)]),strokeWidth:x,trailWidth:x,strokeColor:k,strokeLinecap:d,trailColor:u,prefixCls:a,gapDegree:v||0===v?v:"dashboard"===m?75:void 0,gapPosition:E}),g)},ap=function(e,t){var n,r,o=e.from,a=void 0===o?K.blue:o,i=e.to,c=void 0===i?K.blue:i,l=e.direction,s=void 0===l?"rtl"===t?"to left":"to right":l,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o=100)?"success":a||"normal"),N=function(t,n){var r,o=e.format,a=rp(e);if(!y)return null;var c="line"===w;return o||"exception"!==n&&"success"!==n?r=(o||function(e){return"".concat(e,"%")})(np(p),np(a)):"exception"===n?r=c?i.createElement(so,null):i.createElement(Me,null):"success"===n&&(r=c?i.createElement(io,null):i.createElement(yf,null)),i.createElement("span",{className:"".concat(t,"-text"),title:"string"==typeof r?r:void 0},r)}(O,P),S=Array.isArray(f)?f[0]:f,M="string"==typeof f||Array.isArray(f)?f:void 0;"line"===w?c=u?i.createElement(cp,t({},e,{strokeColor:M,prefixCls:O,steps:u}),N):i.createElement(ip,t({},e,{strokeColor:S,prefixCls:O,direction:k}),N):"circle"!==w&&"dashboard"!==w||(c=i.createElement(op,t({},e,{strokeColor:S,prefixCls:O,progressStatus:P}),N));var A=h()(O,(r(n={},"".concat(O,"-").concat(("dashboard"===w?"circle":u&&"steps")||w),!0),r(n,"".concat(O,"-status-").concat(P),!0),r(n,"".concat(O,"-show-info"),y),r(n,"".concat(O,"-").concat(m),m),r(n,"".concat(O,"-rtl"),"rtl"===k),n),s);return i.createElement("div",t({},ba(x,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"]),{className:A}),c)},up=function(e){var n,o=i.useContext(ko),a=o.getPrefixCls,c=o.direction,l=e.prefixCls,s=e.type,u=void 0===s?"horizontal":s,f=e.orientation,d=void 0===f?"center":f,p=e.orientationMargin,v=e.className,m=e.children,g=e.dashed,y=e.plain,b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o0?"-".concat(d):d,E=!!m,C="left"===d&&null!=p,k="right"===d&&null!=p,O=h()(w,"".concat(w,"-").concat(u),(r(n={},"".concat(w,"-with-text"),E),r(n,"".concat(w,"-with-text").concat(x),E),r(n,"".concat(w,"-dashed"),!!g),r(n,"".concat(w,"-plain"),!!y),r(n,"".concat(w,"-rtl"),"rtl"===c),r(n,"".concat(w,"-no-default-orientation-margin-left"),C),r(n,"".concat(w,"-no-default-orientation-margin-right"),k),n),v),P=t(t({},C&&{marginLeft:p}),k&&{marginRight:p});return i.createElement("div",t({className:O},b,{role:"separator"}),m&&i.createElement("span",{className:"".concat(w,"-inner-text"),style:P},m))};const{Title:fp,Text:dp}=Ld;var pp=t=>{const[n]=(0,i.useState)(t.url),[r,o]=(0,i.useState)(t.type),[a]=(0,i.useState)("dokan_migrator_count_data"),[c]=(0,i.useState)("dokan_migrator_import_data"),[l]=(0,i.useState)(t.nonce),[s,u]=(0,i.useState)(t.number),[f,d]=(0,i.useState)(0),[p,v]=(0,i.useState)(0),[m,h]=(0,i.useState)(0),[g,y]=(0,i.useState)(0),[b,w]=(0,i.useState)("active"),[x,E]=(0,i.useState)(!0);(0,i.useEffect)((()=>{P()}),[m,p]),(0,i.useEffect)((()=>{k(t.startAutoMigration)}),[t.startAutoMigration]),(0,i.useEffect)((()=>{t.lastCompleted&&h(p)}),[t.lastCompleted,p]),(0,i.useEffect)((()=>{t.updateLoading(x)}),[x]);const C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;E(!0),O({action:c,nonce:l,import:r,number:s,offset:e,paged:a,total_count:n,total_migrated:o}).then((function(e){e.success?(h(e.data.process.total_migrated),e.data.process&&0!=e.data.process.migrated&&(d(e.data.process.next),C(e.data.process.next,n,e.data.process.total_migrated,a+1))):(E(!1),t.updateMigrationState(t.type))})).catch((function(e){console.error(e)}))},k=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];E(!0),O({action:a,import:r,nonce:l}).then((function(n){if(n.success){let r=0,o=0;0!=n.data.migrate.old_migrated_status&&n.data.migrate.old_migrated_status.next&&(r=n.data.migrate.old_migrated_status.next,o=n.data.migrate.old_migrated_status.total_migrated,d(r)),v(n.data.migrate.total_count),t.lastCompleted?h(n.data.migrate.total_count):h(o),!e&&E(!1),e&&C(r,n.data.migrate.total_count,o,1)}else console.error(n.data.message)})).catch((function(e){console.error(e)}))},O=async e=>(e.migratable=t.migrate,await jQuery.post(n,e)),P=()=>{let e=Math.floor(100*m/p);0==p&&(e=100),w(100==e?"success":"active"),y(e)};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Vu,{xs:24,sm:24,md:8,lg:8,xl:8},(0,e.createElement)(Nu,{className:"dokan-migrator-card"},(0,e.createElement)("div",{className:"dokan-migrator-align-center"},(0,e.createElement)(dp,{style:{marginBottom:"20px"}},x?(0,e.createElement)(Bd,{size:"small"}):""," ",t.title),(0,e.createElement)(sp,{type:"circle",percent:g,style:{marginBottom:"20px"}}),(0,e.createElement)("div",{className:"dokan-migration-count-status"},(0,e.createElement)("div",{className:"dokan-migration-count-total"},(0,e.createElement)(fp,{style:{textAlign:"center"},level:3},p),(0,e.createElement)(dp,{style:{textAlign:"center",marginTop:"-15px"},type:"secondary"},"Total")),(0,e.createElement)(up,{type:"vertical",style:{height:"40px",marginTop:"10px"}}),(0,e.createElement)("div",{className:"dokan-migration-count-total"},(0,e.createElement)(fp,{style:{textAlign:"center"},level:3},m),(0,e.createElement)(dp,{style:{textAlign:"center",marginTop:"-15px"},type:"secondary"},"Migrated")))))))},vp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"}}]},name:"smile",theme:"outlined"},mp=function(e,t){return i.createElement(xe,a(a({},e),{},{ref:t,icon:vp}))};mp.displayName="SmileOutlined";var hp=i.forwardRef(mp),gp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"warning",theme:"filled"},yp=function(e,t){return i.createElement(xe,a(a({},e),{},{ref:t,icon:gp}))};yp.displayName="WarningFilled";var bp=i.forwardRef(yp),wp=t=>(0,e.createElement)(Bd,{spinning:t.loading,tip:(0,mf.__)("Loading...","dokan-migrator")},(0,e.createElement)(Nu,{style:{width:"99%",marginTop:"25px",height:"450px"}}));(0,e.render)((0,e.createElement)((function(){const[t,n]=(0,i.useState)("vendor"),[r,o]=(0,i.useState)(!1),[a,c]=(0,i.useState)(!1),[l,s]=(0,i.useState)(!1),[u,f]=(0,i.useState)(!1),[d,p]=(0,i.useState)(!1),[v,m]=(0,i.useState)(!1),[h,g]=(0,i.useState)({vendor:!1,order:!1,withdraw:!1}),[y,b]=(0,i.useState)(!0),[w,x]=(0,i.useState)(!0),[E,C]=(0,i.useState)(!1),[k,O]=(0,i.useState)("Migrate to Dokan");function P(e){switch(e){case"vendor":c(!0);break;case"order":s(!0);break;case"withdraw":p(!0),m(!0),S()}}function N(){jQuery.post(dokan_migrator.ajax_url,{action:"dokan_migrator_active_vendor_dashboard",nonce:dokan_migrator.nonce}).done((function(e){e.success&&m(!1)}))}(0,i.useEffect)((()=>{x(!0),f(!0),jQuery.post(dokan_migrator.ajax_url,{action:"dokan_migrator_last_migrated",nonce:dokan_migrator.nonce}).done((function(e){n("undefined"!=e.data.last_migrated?e.data.last_migrated:"vendor"),b("undefined"!=e.data.migratable&&e.data.migratable),C("undefined"!=e.data.migration_success&&e.data.migration_success),O("undefined"!=e.data.set_title?e.data.set_title:"Migrate to Dokan");let t={...h};switch(e.data){case"order":t.vendor=!0;break;case"withdraw":t.vendor=!0,t.order=!0}g(t),x(!1)}))}),[]);const S=()=>{ya.open({message:(0,mf.__)("Congratulations.","dokan-migrator"),description:(0,mf.__)("You have successful migrated to Dokan. Enjoy 🎉","dokan-migrator"),icon:(0,e.createElement)(hp,{style:{color:"#52C519"}}),placement:"bottomRight"})},M=function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n?"#95de64":"#ff7875";return(0,e.createElement)("div",{style:{width:"99%",height:"450px",background:"#FFF",display:"flex",alignContent:"center",justifyContent:"center",alignItems:"center",flexDirection:"column",marginTopL:"25px"}},n?(0,e.createElement)(io,{style:{fontSize:"70px",marginBottom:"30px",color:r}}):(0,e.createElement)(bp,{style:{fontSize:"70px",marginBottom:"30px",color:r}}),(0,e.createElement)("h2",{style:{color:r}},t))};return(0,e.createElement)(e.Fragment,null,w?(0,e.createElement)(wp,{loading:w}):y?E?M((0,mf.__)("You have successfully migrated to dokan.","dokan-migrator"),!0):(0,e.createElement)(Nu,{style:{width:"99%",marginTop:"25px"},title:k},(0,e.createElement)(Iu,{gutter:[16,16]},(0,e.createElement)(pp,{title:(0,mf.__)("Vendor","dokan-migrator"),type:"vendor",url:dokan_migrator.ajax_url,nonce:dokan_migrator.nonce,number:10,updateLoading:e=>f(e),startAutoMigration:r,updateMigrationState:P,lastCompleted:h.vendor,migrate:y}),(0,e.createElement)(pp,{title:(0,mf.__)("Order","dokan-migrator"),type:"order",url:dokan_migrator.ajax_url,nonce:dokan_migrator.nonce,number:5,updateLoading:e=>f(e),startAutoMigration:a,updateMigrationState:P,lastCompleted:h.order,migrate:y}),(0,e.createElement)(pp,{title:(0,mf.__)("Withdraw","dokan-migrator"),type:"withdraw",url:dokan_migrator.ajax_url,nonce:dokan_migrator.nonce,number:10,updateLoading:e=>f(e),startAutoMigration:l,updateMigrationState:P,lastCompleted:h.withdraw,migrate:y})),(0,e.createElement)(Iu,{gutter:[16,16],style:{marginTop:"20px"}},(0,e.createElement)(Vu,{span:24},v?(0,e.createElement)(Xu,{style:{width:"100%"},message:(0,mf.__)("Active dokan vendor dashboard.","dokan-migrator"),type:"success",showIcon:!0,action:(0,e.createElement)(vf,{onClick:N,className:"dokan-migration-active-v-dash-btn",size:"middle",type:"primary"},(0,mf.__)("Active","dokan-migrator"))}):"",d?"":(0,e.createElement)(vf,{onClick:()=>function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:t){case"vendor":o(!0);break;case"order":c(!0);break;case"withdraw":s(!0)}}(t),type:"primary",loading:u},(0,mf.__)("Start migration","dokan-migrator"))))):E?M((0,mf.__)("You have successfully migrated to dokan.","dokan-migrator"),!0):M((0,mf.__)("No plugin found to migrate to dokan","dokan-migrator")))}),null),document.getElementById("dokan-migrator-app"))}()}();
\ No newline at end of file
diff --git a/composer.json b/composer.json
index af564e6..fa8a3b0 100644
--- a/composer.json
+++ b/composer.json
@@ -14,16 +14,16 @@
"email": "info@Wedevs.com"
}
],
- "minimum-stability": "dev",
+ "minimum-stability": "stable",
"require": {
"php": ">=7.0.0|8.0",
"appsero/client": "dev-develop"
},
"require-dev": {
- "wp-coding-standards/wpcs": "dev-master",
- "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
- "tareq1988/wp-php-cs-fixer": "dev-master",
- "phpcompatibility/phpcompatibility-wp": "dev-master"
+ "wp-coding-standards/wpcs": "*",
+ "dealerdirect/phpcodesniffer-composer-installer": "*",
+ "tareq1988/wp-php-cs-fixer": "*",
+ "phpcompatibility/phpcompatibility-wp": "*"
},
"scripts": {
"phpcs": [
diff --git a/dokan-migrator.php b/dokan-migrator.php
index dca7139..adc0a09 100644
--- a/dokan-migrator.php
+++ b/dokan-migrator.php
@@ -3,7 +3,7 @@
* Plugin Name: Dokan Migrator
* Plugin URI: http://WeDevs.com/
* Description: An e-commerce marketplace migration plugin for WordPress. Powered by WooCommerce and WeDevs.
- * Version: 1.0.0
+ * Version: 1.1.0
* Author: WeDevs
* Author URI: https://WeDevs.com/
* Domain Path: /languages/
@@ -56,7 +56,7 @@ final class Dokan_Migrator {
*
* @var string
*/
- public $version = '1.0.0';
+ public $version = '1.1.0';
/**
* Instance of self
@@ -198,7 +198,7 @@ public function init_appsero_tracker() {
return;
}
- $client = new \Appsero\Client( 'Appsero key for dokan migrator plugin', 'Dokan Migrator', DOKAN_MIGRATOR_FILE );
+ $client = new \Appsero\Client( '2852f2fd-66ff-4649-9b00-5f9ed953f8b9', 'Dokan Migrator', DOKAN_MIGRATOR_FILE );
$insights = $client->insights();
$insights->add_extra(
@@ -215,7 +215,7 @@ function() {
/**
* Make dokan migrator plugin HPOS supported.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return void
*/
diff --git a/includes/Abstracts/OrderMigration.php b/includes/Abstracts/OrderMigration.php
index 240ae60..ec80763 100644
--- a/includes/Abstracts/OrderMigration.php
+++ b/includes/Abstracts/OrderMigration.php
@@ -79,7 +79,7 @@ abstract public function reset_sub_orders_if_needed();
/**
* Get seller by order/order id
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return void
*/
diff --git a/includes/Helpers/MigrationHelper.php b/includes/Helpers/MigrationHelper.php
index 0172deb..336fb4b 100644
--- a/includes/Helpers/MigrationHelper.php
+++ b/includes/Helpers/MigrationHelper.php
@@ -152,7 +152,7 @@ public static function get_migratable_plugin() {
* @param WC_Order $order
* @param string $map_by
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return void
*/
@@ -184,7 +184,7 @@ public static function map_shipping_method_item_meta( WC_Order $order, $map_by =
/**
* Split shipping amount for all vendors if wcfm processing an order as admin shipping.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param WC_Order_Item_Shipping $applied_shipping_method
* @param int $order_id
diff --git a/includes/Integrations/WcVendors/OrderMigrator.php b/includes/Integrations/WcVendors/OrderMigrator.php
index 6e5124b..806c972 100644
--- a/includes/Integrations/WcVendors/OrderMigrator.php
+++ b/includes/Integrations/WcVendors/OrderMigrator.php
@@ -11,14 +11,14 @@
/**
* Order migration class.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*/
class OrderMigrator extends OrderMigration {
/**
* Class constructor.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param \WC_Order $order
*/
@@ -30,7 +30,7 @@ public function __construct( \WC_Order $order ) {
/**
* Create sub order if needed.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $seller_id
* @param array $seller_products
@@ -65,7 +65,7 @@ public function create_sub_order_if_needed( $seller_id, $seller_products, $paren
/**
* Delete sub orders if needed.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return void
*/
@@ -76,7 +76,7 @@ public function reset_sub_orders_if_needed() {
/**
* Gets order data from wc-vendors order table for dokan.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $parent_order_id
* @param int $seller_id
@@ -148,7 +148,7 @@ public function get_dokan_order_data( $parent_order_id, $seller_id ) {
/**
* Process refund for a child order.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param \Wc_Order $child_order
* @param integer $seller_id
@@ -180,7 +180,7 @@ public function process_refund( $child_order, $seller_id, $from_suborder = true
/**
* Returns all sellers of an order.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $order_id
*
diff --git a/includes/Integrations/WcVendors/VendorMigrator.php b/includes/Integrations/WcVendors/VendorMigrator.php
index 42639eb..f4aeb76 100644
--- a/includes/Integrations/WcVendors/VendorMigrator.php
+++ b/includes/Integrations/WcVendors/VendorMigrator.php
@@ -10,14 +10,14 @@
/**
* Formats vendor data for migration to Dokan.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*/
class VendorMigrator extends VendorMigration {
/**
* Class constructor
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param WP_User $vendor
*/
@@ -30,7 +30,7 @@ public function __construct( WP_User $vendor ) {
/**
* Returns store name
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -47,7 +47,7 @@ public function get_store_name() {
/**
* Returns store description
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -58,7 +58,7 @@ public function get_store_biography() {
/**
* Returns vendor selling capability.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -73,7 +73,7 @@ public function get_enable_selling() {
/**
* Returns geo location address.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -84,7 +84,7 @@ public function get_geo_address() {
/**
* Returns vendor location latitude.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -95,7 +95,7 @@ public function get_geo_lat() {
/**
* Returns vendor location longitude.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -106,7 +106,7 @@ public function get_geo_long() {
/**
* Returns vendor social data.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return array
*/
@@ -126,7 +126,7 @@ public function get_social( $default ) {
/**
* Returns vendor payment data.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return array
*/
@@ -150,7 +150,7 @@ public function get_payment( $default ) {
/**
* Returns vendor phone number.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -163,7 +163,7 @@ public function get_phone( $default ) {
/**
* Returns if show email in store.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -176,7 +176,7 @@ public function get_is_show_email( $default ) {
/**
* Returns vendor's address.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -198,7 +198,7 @@ public function get_address( $default ) {
/**
* Returns vendor location.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -211,7 +211,7 @@ public function get_location( $default ) {
/**
* Returns store banner id.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $default
*
@@ -225,7 +225,7 @@ public function get_banner( $default ) {
/**
* Returns vendor icon.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -238,7 +238,7 @@ public function get_icon( $default ) {
/**
* Returns vendor gravatar.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -251,7 +251,7 @@ public function get_gravatar( $default ) {
/**
* Returns if show more p tab.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param mixed $default
*
@@ -264,7 +264,7 @@ public function get_show_more_ptab( $default ) {
/**
* Returns store product per page.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $default
*
@@ -277,7 +277,7 @@ public function get_sore_ppp( $default ) {
/**
* Returns if terms and condition is enabled for store.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -290,7 +290,7 @@ public function get_is_enabled_tnc( $default ) {
/**
* Returns terms and conditions.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -303,7 +303,7 @@ public function get_store_tnc( $default ) {
/**
* Returns min order discount.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param string $default
*
@@ -316,7 +316,7 @@ public function get_show_min_order_discount( $default ) {
/**
* Returns store's seo.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param array $default
*
@@ -344,7 +344,7 @@ public function get_store_seo( $default ) {
/**
* Returns commission for specific vendor.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return void
*/
diff --git a/includes/Integrations/WcVendors/WithdrawMigrator.php b/includes/Integrations/WcVendors/WithdrawMigrator.php
index 2cd6fe7..70a6e31 100644
--- a/includes/Integrations/WcVendors/WithdrawMigrator.php
+++ b/includes/Integrations/WcVendors/WithdrawMigrator.php
@@ -9,14 +9,14 @@
/**
* Formats withdraw data for migration to Dokan.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*/
class WithdrawMigrator extends WithdrawMigration {
/**
* Current withdraw data.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @var object
*/
@@ -25,7 +25,7 @@ class WithdrawMigrator extends WithdrawMigration {
/**
* Current withdraw metadata.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @var array
*/
@@ -34,7 +34,7 @@ class WithdrawMigrator extends WithdrawMigration {
/**
* Current withdraw id.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @var int
*/
@@ -43,7 +43,7 @@ class WithdrawMigrator extends WithdrawMigration {
/**
* Class constructor.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param object $withdraw
*/
@@ -54,7 +54,7 @@ public function __construct( $withdraw ) {
/**
* Sets single withdraw item data.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*/
public function set_withdraw_data( $withdraw_data ) {
$this->withdraw = $withdraw_data;
@@ -66,7 +66,7 @@ public function set_withdraw_data( $withdraw_data ) {
/**
* Returns vendor id.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return int
*/
@@ -77,7 +77,7 @@ public function get_vendor_id() {
/**
* Returns withdraw amount.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return int|float
*/
@@ -88,7 +88,7 @@ public function get_withdraw_amount() {
/**
* Returns withdraw created date.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -99,7 +99,7 @@ public function get_withdraw_created_date() {
/**
* Returns withdraw status.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -110,7 +110,7 @@ public function get_withdraw_status() {
/**
* Returns withdraw payment method.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -121,7 +121,7 @@ public function get_withdraw_payment_method() {
/**
* Returns withdraw note
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -132,7 +132,7 @@ public function get_withdraw_note() {
/**
* Returns withdraw details.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -165,7 +165,7 @@ public function get_withdraw_details() {
/**
* Returns withdraw user ip.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return string
*/
@@ -176,7 +176,7 @@ public function get_withdraw_ip() {
/**
* Gets the withdraw meta data.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return array
*/
diff --git a/includes/Integrations/Wcfm/OrderMigrator.php b/includes/Integrations/Wcfm/OrderMigrator.php
index d189234..e5190ef 100644
--- a/includes/Integrations/Wcfm/OrderMigrator.php
+++ b/includes/Integrations/Wcfm/OrderMigrator.php
@@ -16,14 +16,14 @@
/**
* Order migration class.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*/
class OrderMigrator extends OrderMigration {
/**
* Class constructor.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param \WC_Order $order
*/
@@ -37,7 +37,7 @@ public function __construct( \WC_Order $order ) {
/**
* Create sub order if needed
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $seller_id
* @param array $seller_products
@@ -72,7 +72,7 @@ public function create_sub_order_if_needed( $seller_id, $seller_products, $paren
/**
* Delete sub orders of needed.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @return void
*/
@@ -83,7 +83,7 @@ public function reset_sub_orders_if_needed() {
/**
* Gets order data from wcfm order table for dokan.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $parent_order_id
* @param int $seller_id
@@ -146,7 +146,7 @@ public function get_dokan_order_data( $parent_order_id, $seller_id ) {
/**
* Process refund for a child order.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param WC_Order $child_order
* @param integer $seller_id
@@ -303,7 +303,7 @@ public function process_refund( $child_order, $seller_id, $from_suborder = true
/**
* Rename vendor shipping for an order
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param object $order
*
@@ -344,7 +344,7 @@ public function get_order_vendor_shipping() {
/**
* Retrieves WCFM refund requests.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $vendor_id
* @param int $order_id
@@ -367,7 +367,7 @@ public function get_refund_requests( $vendor_id, $order_id ) {
/**
* Retrieves WCFM refund meta data for a specific meta key.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param integer $refund_id
* @param sting $meta_key
@@ -391,7 +391,7 @@ public function get_refund_meta( $refund_id, $meta_key ) {
/**
* Split shipping amount for all vendors if wcfm processing an order as admin shipping.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param WC_Order_Item_Shipping $applied_shipping_method
* @param int $order_id
@@ -453,7 +453,7 @@ public function split_parent_order_shipping( $applied_shipping_method, $order_id
/**
* Returns all sellers of an order.
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @param int $order_id
*
diff --git a/includes/Migrator/Manager.php b/includes/Migrator/Manager.php
index 92413ef..a61282a 100644
--- a/includes/Migrator/Manager.php
+++ b/includes/Migrator/Manager.php
@@ -42,7 +42,7 @@ class Manager {
/**
* Get data page id
*
- * @since DOKAN_MIG_SINCE
+ * @since 1.1.0
*
* @var integer
*/
diff --git a/languages/dokan-migrator.pot b/languages/dokan-migrator.pot
index 57792ad..14a5bb9 100644
--- a/languages/dokan-migrator.pot
+++ b/languages/dokan-migrator.pot
@@ -1,23 +1,21 @@
-# Copyright (c) 2022 weDevs Pte. Ltd. All Rights Reserved.
+# Copyright (c) 2023 weDevs Pte. Ltd. All Rights Reserved.
msgid ""
msgstr ""
-"Project-Id-Version: Dokan Migrator 1.0.0\n"
+"Project-Id-Version: Dokan Migrator 1.1.0\n"
"Report-Msgid-Bugs-To: https://github.com/weDevsOfficial/dokan-migrator/issues\n"
"Last-Translator: support@wedevs.com\n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2022-11-10T11:42:50+00:00\n"
+"POT-Creation-Date: 2023-12-14T09:37:06+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"X-Generator: WP-CLI 2.6.0\n"
+"X-Generator: WP-CLI 2.7.1\n"
"X-Domain: dokan-migrator\n"
#. Plugin Name of the plugin
-#: build/dokan-migrator/includes/Admin/Menu.php:36
-#: build/dokan-migrator/includes/Admin/Menu.php:37
-#: includes/Admin/Menu.php:36
-#: includes/Admin/Menu.php:37
+#: includes/Admin/Menu.php:33
+#: includes/Admin/Menu.php:34
msgid "Dokan Migrator"
msgstr ""
@@ -37,149 +35,119 @@ msgstr ""
msgid "https://WeDevs.com/"
msgstr ""
-#: build/dokan-migrator/includes/Helpers/MigrationHelper.php:59
-#: includes/Helpers/MigrationHelper.php:59
+#: includes/Helpers/MigrationHelper.php:70
msgid "Dokan vendor dashboard activated."
msgstr ""
-#: build/dokan-migrator/includes/Helpers/MigrationHelper.php:93
-#: includes/Helpers/MigrationHelper.php:93
+#: includes/Helpers/MigrationHelper.php:104
msgid "Migrate to dokan"
msgstr ""
-#: build/dokan-migrator/includes/Helpers/MigrationHelper.php:97
-#: includes/Helpers/MigrationHelper.php:97
+#: includes/Helpers/MigrationHelper.php:108
msgid "Migrate Wcfm To Dokan"
msgstr ""
-#: build/dokan-migrator/includes/Helpers/MigrationHelper.php:101
-#: includes/Helpers/MigrationHelper.php:101
+#: includes/Helpers/MigrationHelper.php:112
msgid "Migrate Wc Vendors To Dokan."
msgstr ""
-#: build/dokan-migrator/includes/Migrator/Ajax.php:59
-#: includes/Migrator/Ajax.php:59
+#: includes/Migrator/Ajax.php:56
msgid "Item count successfull."
msgstr ""
-#: build/dokan-migrator/includes/Migrator/Ajax.php:93
-#: includes/Migrator/Ajax.php:93
+#: includes/Migrator/Ajax.php:91
msgid "Import successfull."
msgstr ""
-#: build/dokan-migrator/includes/Migrator/Ajax.php:117
-#: includes/Migrator/Ajax.php:117
+#: includes/Migrator/Ajax.php:115
msgid "Nonce verification failed!"
msgstr ""
-#: build/dokan-migrator/includes/Migrator/Manager.php:215
-#: includes/Migrator/Manager.php:215
+#: includes/Migrator/Manager.php:232
msgid "Invalid import type"
msgstr ""
-#: build/dokan-migrator/includes/Processors/Order.php:83
-#: build/dokan-migrator/includes/Processors/Vendor.php:103
-#: build/dokan-migrator/includes/Processors/Withdraw.php:119
-#: includes/Processors/Order.php:83
-#: includes/Processors/Vendor.php:103
-#: includes/Processors/Withdraw.php:119
+#: includes/Processors/Order.php:125
+#: includes/Processors/Vendor.php:99
+#: includes/Processors/Withdraw.php:122
msgid "Migrator class not found"
msgstr ""
-#: build/dokan-migrator/includes/Processors/Order.php:98
-#: includes/Processors/Order.php:98
+#: includes/Processors/Order.php:140
msgid "No orders found to migrate to dokan."
msgstr ""
-#: build/dokan-migrator/includes/Processors/Vendor.php:116
-#: includes/Processors/Vendor.php:116
+#: includes/Processors/Vendor.php:112
msgid "No vendors found to migrate to dokan."
msgstr ""
-#: build/dokan-migrator/includes/Processors/Withdraw.php:147
-#: includes/Processors/Withdraw.php:147
+#: includes/Processors/Withdraw.php:150
msgid "No withdraws found to migrate to dokan."
msgstr ""
-#: build/dokan-migrator/templates/app.php:2
#: templates/app.php:2
msgid "Loading.."
msgstr ""
-#: build/dokan-migrator/templates/template-active-vendor-dashboard.php:17
#: templates/template-active-vendor-dashboard.php:17
msgid "Activate dokan vendor dashboard."
msgstr ""
#. translators: 1$s: opening anchor tag, 2$s: closing anchor tag
-#: build/dokan-migrator/templates/template-active-vendor-dashboard.php:21
#: templates/template-active-vendor-dashboard.php:21
msgid "%1$sActive now%2$s"
msgstr ""
#. translators: 1$s: the plugin to migrate to dokan
-#: build/dokan-migrator/templates/template-alert-migrate-to-dokan.php:21
#: templates/template-alert-migrate-to-dokan.php:21
msgid "Do You Want To %1$s ?"
msgstr ""
#. translators: 1$s: opening anchor tag, 2$s: closing anchor tag
-#: build/dokan-migrator/templates/template-alert-migrate-to-dokan.php:27
#: templates/template-alert-migrate-to-dokan.php:27
msgid "Click %1$1sHere%2$2s to move to the migration process."
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "Loading..."
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "Congratulations."
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "You have successful migrated to Dokan. Enjoy 🎉"
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "You have successfully migrated to dokan."
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "Vendor"
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "Order"
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "Withdraw"
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "Active dokan vendor dashboard."
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "Active"
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "Start migration"
msgstr ""
#: assets/dist/index.js:1
-#: build/dokan-migrator/assets/dist/index.js:1
msgid "No plugin found to migrate to dokan"
msgstr ""
diff --git a/package.json b/package.json
index 352cf57..25e6f45 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "dokan-migrator",
- "version": "1.0.0",
+ "version": "1.1.0",
"description": "An e-commerce marketplace migration plugin for WordPress.",
"author": "WeDevs",
"license": "GPL",
diff --git a/readme.txt b/readme.txt
index 457ffa4..2846003 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,9 +3,10 @@ Contributors: tareq1988, wedevs, nizamuddinbabu
Donate link: https://tareq.co/donate/
Tags: dokan, dokan migrator, multivendor marketplace
Requires at least: 5.8
-Tested up to: 6.1.1
-Stable tag: 1.0.0
-Requires PHP: 7.2
+Tested up to: 6.4.2
+WC tested up to: 8.4.0
+Stable tag: 1.1.0
+Requires PHP: 7.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -39,7 +40,7 @@ Check out all the [features of Dokan](https://wedevs.com/dokan/features/) and mo
- WCFM
- WC Vendors
-- YITH
+- YITH (coming soon)
**MIGRATE IN 3 EASY STEPS**
@@ -82,6 +83,17 @@ Extract the zip file and just drop the contents in the wp-content/plugins/ direc
== Changelog ==
+= v1.1.0 ( Dec 14, 2023 ) =
+
+- **new:** Introduced Wc Vendors plugin support to migrate to Dokan.
+- **new:** Introduced support for WooCommerce HPOS in the migration process of WCFM to Dokan, enhancing compatibility and functionality.
+- **update:** After completing the migration process, all supported plugins are now properly enlisted to facilitate complete and clean inactivation.
+- **update:** Enhanced the functionality of migratable orders and vendors, improving the overall migration process and user experience.
+- **Fix:** Resolved issues with the order list where orders already migrated were showing as migratable, leading to errors. Now, such orders are correctly excluded from the migration process.
+- **Fix:** Fixed the migration of vendor location data, ensuring accurate and complete data transfer.
+- **Fix:** Resolved issues with Dokan pages after migrating to Dokan, ensuring seamless integration and functionality.
+- **Fix:** Fixed the plugin key WC Vendors/WCFM when migration starts, allowing only the plugin migration functionalities to load properly, enhancing stability and performance.
+- **Fix:** Corrected the count of migratable orders during the WC Vendors to Dokan migration, ensuring accuracy in the migration dashboard.
== Upgrade Notice ==