Welcome to the wordpress/woocommerce integration plugin for shops that need to setup direct ordering from a distributor.
To integrate your woocommerce shop follow the User Documentation
You're trying to keep your WooCommerce site efficient, cost-effective, and fast, especially when plugin users are importing or updating product data.
This plugin is a much better solution than CSV imports for keeping products in sync with your distributor.
Current features include:
✅ Automated full product sync (daily at 2 AM) ✅ Automated stock/price updates (every 15 minutes) ✅ Batch processing with memory management ✅ Category synchronization ✅ Image handling ✅ Progress tracking and admin interface ✅ Order processing integration ✅ Error handling and retry logic
- Use background processing (asynchronous jobs) to queue updates in small batches (e.g., 25–100 products at a time).
- Rate-limit API requests per user or per session to avoid spikes.
- Avoid AJAX-heavy UIs that reload or re-fetch data frequently without caching.
- Implement caching where possible (e.g., for product lookups or SKU checks).
- Running all updates synchronously, especially via AJAX, which can hit memory and PHP execution limits.
- Allowing users to submit massive CSVs that are processed all at once.
- Does it batch updates or try to process the entire CSV at once?
- Are you using
wp_schedule_single_event()
or a queue system to space out updates? - Are you writing transients or using object caching to minimize repetitive lookups?
- Stream CSV files (don’t load entire file into memory).
- Use generators or iterators in PHP to handle rows one at a time.
- Avoid loading full product objects (
wc_get_product()
) unless absolutely necessary. Use raw SQL or lightweight data access when possible. - Use
update_post_meta()
directly vs full product object updates if you’re not affecting relationships, taxes, or stock logic.
- Holding arrays of thousands of products in memory.
- Using
get_posts()
without pagination or limits.
- When a user imports 1,000+ products, how much memory is consumed?
- Are you cleaning up memory in loops (
unset()
,gc_collect_cycles()
if needed)?
High CPU or memory usage from:
- Simultaneous bulk edits
- Poorly optimized import routines
- Endless loops on failed background jobs
- Users refreshing during long-running updates
- Add throttling or progress indicators to discourage refreshes.
- Set memory/time limits per batch update (e.g.,
set_time_limit(30)
). - Use transient flags or database locks to prevent multiple imports running at once.
- Add optional limits like: “Max 1000 products per import.”
Licensed under the GNU General Public License Version 2.0 (or later); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
GPLv2 or later https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.