Linux 软件免费装
Banner图

Bulk COGS Editor for WooCommerce

开发者 dineshinau
更新时间 2026年11月26日 16:57
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.2
版权: GPLv3
版权网址: 版权信息

标签

cost of goods sold woocommerce cogs bulk edit cogs cogs import cogs export

下载

1.2.1 1.1.0 1.0.0 1.1.1 1.2.0 1.3.0 1.3.1 1.3.2

详情介绍:

Bulk COGS Editor for WooCommerce is a fast, powerful bulk editing solution for managing WooCommerce COGS with WooCommerce's native Cost of Goods Sold feature. Quickly filter large catalogs, save recurring filter setups as presets, preview proposed changes, and apply updates through background batch processing with live progress tracking. Save reusable presets for recurring supplier cost adjustments, import WooCommerce cost of goods from UTF-8 CSV or Excel (XLSX), export cost data, and track operation history with safe or overwrite rollback options while retaining original values. Product selling prices and order data are never altered. Use the editor to manage WooCommerce cost of goods for products and variations. There is nothing extra to configure beyond enabling Cost of Goods Sold in WooCommerce. For setup instructions and a step-by-step guide, see the Bulk COGS Editor documentation. Watch the plugin in action https://youtu.be/K-zo4dw7og4 Why use Bulk COGS Editor? How it works
  1. Open Products > Bulk COGS Editor and choose Bulk edit.
  2. Choose your filters and find the matching products. Browse their selling prices, regular prices, and current COGS before choosing a cost update.
  3. Choose a WooCommerce COGS action, review the preview, optionally edit individual New COGS values with the pencil controls, and select the products to update.
  4. Review and confirm the update, then follow its results in the editor.
Quick 60-Second Demo - YouTube Short Video https://www.youtube.com/watch?v=Pxtvi0YbDRw Features Performance for large catalogs Bulk processing reduces repeated product searches and counts. It loads reusable product data in batches and groups cache cleanup to reduce repeated work. This makes managing WooCommerce COGS across thousands of products practical from the WordPress dashboard. The plugin saves progress checkpoints and each product's result to support recovery after interruptions. WooCommerce cost of goods values are saved through WooCommerce's product APIs, preserving its hooks and cache handling. All updates can be started and monitored from the WordPress dashboard, including on shared hosting. WP-CLI is not required. For larger catalogs, such as more than 5,000 or 10,000 SKUs, an optional WP-CLI runner may help WooCommerce COGS updates finish sooner. See Installation for details; any speed improvement depends on your hosting and workload. Import and export WooCommerce cost of goods with CSV or Excel CSV and XLSX import Choose CSV mode and click Import on the Bulk COGS Editor page. Upload a UTF-8 CSV or XLSX file. The upload limit follows WordPress's maximum upload size, shown beside the file field. The plugin has no separate file-size or row-count limit. Hosting upload, memory, storage and execution limits still apply. Sample CSV Export products to CSV, fill in the blank new_cogs column, then import the file to preview your changes. Use this format for your CSV file, replacing the example IDs, SKUs, and costs with your product data: id,sku,new_cogs 123,PRODUCT-001,25.50 124,PRODUCT-002,40.00 Your file must include new_cogs and at least one product identifier: id or sku. Older files can use cogs when the new_cogs header is missing. XLSX imports read raw values from the first worksheet. Replace formulas with values and store SKUs as text to preserve leading zeros. XLSX requires PHP's ZIP, XMLReader and DOM extensions. Exports use CSV format. Preview and apply Preview preparation runs in background batches without changing products. Progress is saved between batches, and you can close the page and return to check it. Preparation time varies with file size, product mix, hosting, and background worker availability. When ready, review products and download validation errors if needed. Use the pencil beside New COGS to correct a valid product's staged cost, then Save or Cancel. Saving changes only the preview; select products, review the selected changes, and confirm the update to change product costs. Preparation can be cancelled separately from an applied update. Completed imports with no skipped, failed, or unprocessed products have no update error report to download. Original uploads are deleted after preparation. Staged previews and reports expire after about 24 hours. Retention extends while an applied update is active. History and retention Operation history and original cost records follow the retention period set in Settings. See the retention FAQ below. Daily cleanup preserves active operations and data needed for reports. The plugin also keeps records that prevent the same preview from being applied more than once, including simultaneous Apply requests. These records follow the configured retention period and are removed only when they are no longer needed. Requirements If Cost of Goods Sold is unavailable or disabled, the editor is turned off and explains what is needed. When supported and permitted by your account, the availability notice offers Update Now for an older WooCommerce version or Enable Cost of Goods Sold for a disabled feature. Otherwise, ask an administrator to complete setup. Privacy Bulk COGS Editor for WooCommerce does not send product, customer, order, or store data to external services. All WooCommerce COGS calculations and WooCommerce cost of goods updates are performed locally on your WordPress/WooCommerce installation. Developer resources Bulk COGS Editor for WooCommerce is open-source software and is made to be extended. The source code is available in the GitHub repository. Connect with the developer

安装:

  1. Upload the plugin files to the /wp-content/plugins/bulk-cogs-editor-for-woocommerce directory, or install the plugin through the WordPress Plugins screen.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Make sure the Cost of Goods Sold feature is enabled in WooCommerce settings.
  4. Go to Products > Bulk COGS Editor in the WordPress admin menu.
  5. Filter your products, choose an action, preview the changes, then confirm to apply them.
Optional: run large updates with WP-CLI The plugin works from the WordPress dashboard on shared hosting without enabling or installing WP-CLI. WooCommerce's normal background runner handles the work. For larger catalogs, such as more than 5,000 or 10,000 SKUs, you can optionally use Action Scheduler's CLI runner for import preview preparation and confirmed updates while the editor continues to show progress and accept cancellations. See the Action Scheduler documentation for more information. If you choose to use WP-CLI, import preview workers must run on the upload server under the same operating-system account as PHP. This lets them read the private temporary uploads. If your shell uses a different account, ask your host to run the command under PHP's account. Ordinary product updates do not need the uploaded file. During preparation, worker logs show the stage, checked row count, and batch size. Total and remaining row counts become available after reading finishes. After uploading an import for preview or confirming an update in the editor, run this command from your WordPress directory: wp action-scheduler run --group=bulk-cogs-editor --batch-size=1 --batches=0 Check the queue with: wp action-scheduler status --group=bulk-cogs-editor The status report covers the site's full Action Scheduler queue. The run command processes due plugin actions for all users and exits when none remain. It does not wait for scheduled retries. --batch-size counts scheduled actions, not products. If another worker owns the available batch, wait for it to finish or run: wp action-scheduler run --group=bulk-cogs-editor --batch-size=1 --batches=0 --force The plugin prevents two workers from changing the same operation simultaneously. Using --force can still increase server load. Keep the normal background runner enabled for retries. If your host runs the command on a schedule, use a process lock to prevent overlapping command runs. For performance checks, prefix the command with time. WooCommerce > Status > Logs under source dkbce records worker timing and runner details. Reported performance for large catalogs In the developer's reported benchmark results, processing approximately 10,000 products improved from 50–60 minutes initially to 40–42 minutes, then 25–28 minutes. The latest reported WP-CLI run updated 10,000 products in 15 minutes 24 seconds, with zero skipped and zero failed — about 69–74% less elapsed time than the initial implementation. The completion screenshot records the editor operation's elapsed time of 00:15:24. End-to-end CLI runtime was not measured separately. This is a single benchmark run, not a guaranteed completion time. Actual performance depends on hosting, database speed, product types, installed extensions, and background worker availability. Repeated runs and larger catalogs still need benchmarking.

屏幕截图:

  • **Enable WooCommerce COGS:** Enable native Cost of Goods Sold in WooCommerce settings before using the editor.
  • **Filters and cost actions:** Filter products, configure cost adjustments, and save reusable filter presets to your account.
  • **Product preview:** Compare current and proposed COGS for 1,000 selected products before reviewing the update.
  • **Confirm with rollback history:** Review the operation and selection; retain original costs and product changes for rollback.
  • **Confirm without rollback history:** Confirm an update without retaining original costs or detailed changes for rollback.
  • **Update started:** Background processing begins for 1,000 products, with 0% progress and live outcome counters.
  • **Update progress:** Halfway through processing: 500 of 1,000 products updated, with elapsed time and estimated time remaining.
  • **Stop updates confirmation:** Review the cancellation warning before stopping remaining updates; already saved cost changes remain.
  • **Update completed:** All 1,000 products processed successfully, with zero skipped and zero failed.
  • **CSV export setup:** Choose product filters and export columns, including the blank `new_cogs` column for future cost imports.
  • **Confirm CSV export:** Review the selected product count and output columns before creating the CSV file.
  • **CSV export progress:** Follow CSV generation progress, elapsed time, estimated remaining time, and cancellation controls.
  • **CSV download ready:** Download the completed export after all selected products have been processed.
  • **Exported CSV file:** View product identifiers, current costs, and the blank `new_cogs` column in the exported spreadsheet.
  • **Edit CSV costs:** Enter replacement values under `new_cogs`, preserving product identifiers before importing the updated file.
  • **Import preparation:** Review CSV/XLSX requirements, upload a file, and follow background preview preparation without changing product costs.
  • **Cancel preparation confirmation:** Confirm cancellation of import preview preparation; product costs remain unchanged.
  • **Import preview:** Review validated products, current costs, proposed costs, differences, and readiness before choosing which changes to apply.
  • **Confirm imported costs:** Review the selected import changes and choose whether to retain rollback history before applying.
  • **Operation history:** Filter operations by status, type, user, dates, or search; inspect recorded results and notes.
  • **Recorded product changes:** Compare original and updated COGS, product identifiers, and differences; review eligible operations for rollback.
  • **Rollback review:** Compare current costs with original values, review the rollback policy, and acknowledge the warning before confirming.
  • **Rollback completed:** A completed rollback shows 1,000 restored products, outcome counters, and elapsed time.
  • **Saved presets:** Manage account presets, view creation dates, and access row actions or bulk deletion.
  • **Edit preset:** Rename a preset or adjust its product filters, then update it or cancel editing.
  • **Delete preset confirmation:** Review the selected preset before confirming or cancelling its deletion.
  • **Bulk delete presets:** Review multiple selected presets in one confirmation before deleting them or cancelling.
  • **Plugin settings:** Configure default rollback history, custom retention days, and rollback behavior; access operation recovery controls.
  • **Force clear confirmation:** Review the warning: clearing editor references does not restore costs or immediately stop active workers.

升级注意事项:

1.3.0 Version 1.3.0 redesigns the editor workflow, improves selection, progress, import/export and rollback guidance, and adds account-based presets with a dedicated management tab. New presets use a custom database table; existing browser and user-meta presets are not migrated.

常见问题:

Can I choose whether an update keeps rollback history?

Yes. Settings > Default rollback mode offers Keep rollback history (the initial default) and No rollback history. In the update confirmation popup, the Keep rollback history checkbox starts with that default and can be changed for the individual bulk update or CSV import. Its explanation updates as you change it. With history enabled, original costs and detailed product changes remain available for the configured retention period. With history disabled, the operation cannot be rolled back and detailed cost-change history is not retained. Operation results and retry protection remain available. Temporary retry journals are removed by background cleanup after completion, failure, or cancellation. Changing the default does not change existing operations.

How often does progress refresh, and how can I enable diagnostic logs?

Update progress refreshes every 10 seconds for fewer than 1,000 selected items, or every 25 seconds for 1,000 or more. While the total is unknown, polling uses 25 seconds. Use Refresh status for an immediate update. Bulk-update progress is checkpointed after 50 products or 10 seconds, and at chunk boundaries or worker exit. Workers continue checking for cancellation every second between products. Errors and operation completion summaries remain logged. Detailed worker timings and routine per-product diagnostics are disabled by default. To enable them temporarily for troubleshooting or benchmarking, add define( 'DKBCE_DIAGNOSTICS', true ); to wp-config.php. This does not change Query Monitor or other site-wide profiling settings.

How do I bulk update WooCommerce COGS?

Use Bulk edit for one WooCommerce cost of goods action across a selected group, with optional inline edits for individual products. Use CSV import for costs prepared in a spreadsheet. The steps for both workflows appear above.

Can I edit New COGS for one product before applying a bulk update?

Yes. Choose a cost action in Step 2, then use the pencil beside a product's New COGS in the bulk review table. Enter a non-negative cost using your store's decimal precision, then choose Save. Cancel leaves the saved preview unchanged; Reset to Step 2 removes that product's override. Enter 0 to clear COGS; WooCommerce stores this as Empty. In bulk previews, you can edit up to 500 individual costs. Saved edits are marked Edited, stay across pages, override Step 2 only for those products, and are counted for selected products in the confirmation summary. Saving an edit does not update the product; you must still select it and confirm the update. Save or cancel an open edit before continuing. CSV export previews and results browsed without a Step 2 action do not offer inline editing. Changing filters or the bulk action clears inline edits. The automatic refresh after completion preserves them when the action and filters are unchanged, so New COGS continues to show the edited value. Import previews also offer a pencil beside New COGS for valid products. Save replaces that product's staged import value; Cancel leaves its saved staged value unchanged. Saved values remain across preview pages and are used when you select products and confirm Apply. Products are not updated when you save an edit. The 500-edit limit and Reset to Step 2 control apply only to bulk previews.

How do COGS health notices work?

The plugin scans published products and variations in background batches and caches counts for one hour. It warns about missing COGS or costs above the current selling price. If both apply, the missing-COGS warning appears first. Counts reflect the last completed scan, so recent edits may not appear immediately. In Settings, choose whether the notice appears only in Bulk COGS Editor (the default) or across the site admin. Dismissing it hides it for your account for one hour. Refresh now starts a background recount, shows its progress, and updates or clears the notice when finished. Large catalogs or busy background queues can take several minutes. A scan does not change product costs.

Can I bookmark a specific editor tab?

Yes. Switch to Bulk edit, CSV, History, Presets, or Settings, then save or copy the browser URL. The selected tab is included in the URL; browser Back and Forward restore earlier tab selections.

Can I import WooCommerce cost of goods from CSV or Excel?

Yes. Both formats support product IDs or SKUs for importing WooCommerce COGS. See the import section above for required columns, file requirements, and validation steps.

Can I export product costs and import updated values?

Yes. Keep the exported product IDs or SKUs unchanged when preparing your WooCommerce cost of goods updates. Export produces CSV even if a previous import used XLSX; see the sample CSV above.

Does this plugin work with WooCommerce's native Cost of Goods Sold feature?

Yes. It requires WooCommerce 10.3 or later with native WooCommerce COGS enabled. If the feature is disabled or unavailable, the editor explains what is required.

Can I increase all product costs by a percentage?

Yes. The percentage action applies to your selected products and adjusts WooCommerce COGS values. Products without a saved WooCommerce cost of goods are skipped; use Set exact cost to assign their initial values.

Does preparing a preview change product costs?

No. Finding products or validating an import only prepares a preview. Product costs change after you explicitly confirm the update.

Do I need to read the documentation or watch the video before using the editor?

No. The editor includes task-specific Help and instructions, field guidance, and cost examples. Use the documentation or video when you need more detail.

Where can I see the result of my last update?

Expand Recent activity for the latest completed operation, including updated counts, completion time, elapsed time, and highlighted problems. Open History to inspect earlier operations.

Can I update the same products again?

When a bulk update finishes in the open editor, its product selection is reused with current costs for another preview, even if those costs no longer match the original filters. Edit filters to narrow that selection. Choose Reset filters to start a new selection.

Can I use other tabs while an update is running?

Yes. You can move between Bulk edit, CSV import / export, History, and Settings while a background operation runs. Controls that could conflict with it stay disabled until the operation finishes.

How do I stop an update or rollback?

Choose Stop remaining updates, or Cancel rollback for a rollback, and confirm in the editor dialog. Cancel or Escape closes the dialog without requesting cancellation. Saved cost changes remain, and the active worker may take a short time to stop. Import preview preparation has its own Cancel preparation control with a confirmation dialog. Cancelling preparation does not change product costs; upload the file again to prepare another preview.

What should I do if an operation is stuck?

Try normal cancellation first. If it does not work, a WooCommerce manager can open Settings, choose Force clear current operation, review the warning, and confirm. This resets the current user's editor operation and import preview references and requests cancellation. It does not restore costs or immediately stop an active worker. Saved changes, operation history, and retained rollback data are kept. Check History before starting another update.

Can I roll back a completed update?

Open History, select View details, and choose Review rollback when original costs are retained. Compare current and original values, then choose Confirm rollback. Expired operations and older records that contain only summary results cannot be rolled back. Restoring changes saved before cancellation also requires a separate rollback.

What if product cost changed after the original update?

Choose the skip-changed policy in Settings to preserve later cost edits. Choose overwrite to restore recorded original costs instead. The policy shown during review remains fixed for that rollback attempt. If a rollback is cancelled or does not finish, review a new attempt for the remaining products. Already restored products are excluded, even if edited again later.

How long is operation history retained?

Choose 30 days, 90 days, or a custom period of 1 to 36,500 days in Settings. The default is 30 days. Shortening retention also affects existing history. Extending it cannot recover original costs already deleted by scheduled cleanup.

How does the plugin handle variable products and variations?

Variations are treated as individual product records. You can filter and update WooCommerce COGS on variations directly, and variable parent products will not be changed when only variations are selected and updated. This makes managing WooCommerce cost of goods precise at the variation level.

How does "Select all" work in the filter dropdowns?

Each category, product type, stock status, and available brand dropdown has a "Select all" checkbox. Check it to select every option, or uncheck it to clear the selection. You can still select individual options. An empty filter does not restrict the results.

Why can selecting all categories return fewer matches than leaving the category filter empty?

Selecting all categories requires products to have a category assignment. Variations match the categories assigned to their parent product. Products without categories, and variations whose parent has no categories, are excluded. Use the "All categories" link in the dropdown or clear the category selection to remove this restriction.

Are child categories included?

Yes. The dropdown lists both parent and child categories in a flat list. Selecting a parent category also matches products in its child categories and variations of those products.

Does the matching total include variations?

Yes. The result message shows the total followed by separate product and variation counts, for example: "950 matches: 300 products and 650 variations." The product count excludes variation records. The counts cover all matching results, not just the current preview page.

What happens to products without a COGS value during relative adjustments?

Percentage and fixed-amount adjustments skip products without a saved WooCommerce COGS value. Use Set exact cost to assign one. WooCommerce treats zero as empty; use Clear cost to remove a saved WooCommerce cost of goods value.

How are large catalogs processed?

Updates run in background batches, so you can close the browser and return to the editor for progress. Completion depends on hosting and background worker availability. Cancelling keeps changes already saved; it does not undo them.

Does this plugin modify product prices?

No. The plugin only modifies the WooCommerce cost of goods (WooCommerce COGS) value. Product selling prices and order data are never altered.

Where can I give feedback?

If you have a suggestion to improve the plugin, please open an issue on GitHub or use the support forum on WordPress.org.

更新日志:

1.3.2 (2026-11-26) 1.3.1 (2026-11-18) 1.3.0 (2026-11-12) 1.2.1 (2026-10-27) 1.2.0 (2026-10-24) 1.1.1 (2026-10-20) 1.1.0 (2026-10-14) 1.0.0 (2026-10-10)