# learnpress/4.4.2/assets/js/admin/orders/export-orders.min.js

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.2. 1 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.2/code/assets/js/admin/orders/export-orders.min.js
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.2/raw/assets/js/admin/orders/export-orders.min.js
- Modified: 2026-07-11T02:31:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.2/code/assets/js/admin/orders/export-orders.min.js#L10-L20`.

```javascript
import*as lpUtils from"lpAssetsJsPath/utils.js";import*as lpToastify from"lpAssetsJsPath/lpToastify";export const ExportOrdersToCSV=()=>{lpUtils.eventHandlers("click",[{selector:".lp-btn-export-order-to-csv",class:this,callBack:e=>{const{e:s,target:t}=e;s.preventDefault(),lpUtils.lpSetLoadingEl(t,!0);let o=JSON.parse(t.dataset.send);const l={success:e=>{const{message:s,status:t,data:a}=e;if("success"!==t)throw s;{const e=a?.max_page,t=a?.next_page,c=a?.done,p=a?.download_url;if(e&&t&&t<=e)o={...o,paged:t},window.lpAJAXG.fetchAJAX(o,l);else if(c){lpToastify.show(s,"success");const e=document.createElement("a");e.href=p,e.target="_self",document.body.appendChild(e),e.click(),document.body.removeChild(e)}}},error:e=>{lpToastify.show(e,"error")},completed:()=>{lpUtils.lpSetLoadingEl(t,!1)}};window.lpAJAXG.fetchAJAX(o,l)}}])};
```
