Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/madebygarzon/product-synchronizer/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Product Synchronizer — WooCommerce to PostgreSQL
Asynchronous synchronization plugin that keeps WooCommerce products aligned with PostgreSQL (public.inv_items) through event queue processing.
Why recruiters should care
- Real integration challenge solved with a robust queue-based design.
- Focus on data consistency and operational resilience.
- Suitable for high-volume catalog synchronization scenarios.
Technical Highlights
- WooCommerce hooks capture product changes.
- Internal queue table for event processing.
- Batch worker via WP-Cron.
- SKU-based upsert into PostgreSQL.
- Configurable deletion mode (
soft/hard).
Stack
- WordPress + WooCommerce
- PHP (
pgsqlextension) - PostgreSQL
Setup
- Install the plugin in
wp-content/plugins. - Activate it in WordPress.
- Configure the PostgreSQL connection in plugin settings.
- Run the initial bootstrap and queue processing.
CLI Helpers
wp altek-sync bootstrap --batch=500
wp altek-sync run-worker
Admin Panel (visual guide)
The settings screen shows:
- Total WordPress products.
- Total Altek products (Postgres).
- Queue status (
pending,retry,processing,failed). - Table with the latest 20 events (SKU, event, status, attempts, error).
Compare and enqueue missingbutton.Process queue nowbutton.
Initial Bootstrap (SKU comparison)
Compares WooCommerce SKUs against Postgres and enqueues only missing ones:
wp altek-sync bootstrap --batch=500
Run the worker manually (optional):
wp altek-sync run-worker
Queue Table in WordPress
{wp_prefix}altek_sync_queue
Statuses:
pendingprocessingretrydonefailed
v1 Mapping Woo -> inv_items
item:trim(product.sku). If numeric and shorter than 9 digits, it is left-padded with zeros to 9 digits.codigobarras:product.skunombre:product.namenombreweb:product.nameexistencia:product.stock_quantity(when stock is managed)costoestandar:product.regular_pricecostopromedio:product.regular_priceid_altek:product.id(WordPress ID)imagen: featured image URLbloqueado:FALSEon create/updatecostoultimacompra(optional):meta _altek_last_costif presentidcategoria(optional): first Woo categoryobservaciones(optional):short_descriptionalto(optional):product.heightwhen numericancho(optional):product.widthwhen numeric
Database Recommendations
Before production:
- Create uniqueness on normalized SKU (
upper(trim(item))). - Define an official product deletion policy (soft/hard).
- Use a least-privilege PostgreSQL user.
- Confirm SSL (
sslmode=require) when applicable.
Author
- Created by Carlos Garzón
- Software Engineer, Fullstack Developer.
Licenses
MIT