The S2S Image Linker plugin

Overview

The S2S Image Linker plugin was developed by YBO Digital to solve a limitation in the standard Stock2Shop (S2S) to WooCommerce synchronisation process.

While Stock2Shop successfully synchronises product data, stock levels, pricing and the primary product image, additional gallery images are often not automatically attached to WooCommerce products. This traditionally required periodic CSV imports and manual intervention.

The S2S Image Linker automates this process by retrieving image relationships from Stock2Shop and attaching existing WordPress Media Library images to the correct WooCommerce products.

Why This Plugin Exists

Many stores using Stock2Shop and WooCommerce experience the following challenges:

Missing Product Galleries

The primary image is synchronised correctly, however additional gallery images are not automatically linked to products.

Manual CSV Imports

Additional images typically require:

    • Exporting image data
    • Preparing CSV files
    • Importing into WooCommerce
    • Ongoing maintenance

This process is time consuming and prone to errors.

Catalogue Growth

As product catalogues grow, manually maintaining image galleries becomes increasingly difficult.
The S2S Image Linker removes this manual process.

How The Plugin Works

The plugin uses the Stock2Shop API to retrieve image information for a product.

Step 1 – Product Identification
The plugin identifies products using the SKU (Source Product Code).

Step 2 – Retrieve Image Relationships
The plugin requests image information from Stock2Shop and retrieves:
• Product SKU
• Product Title
• Product Images
• Image Order

Step 3 – Locate Existing Images
The plugin searches the WordPress Media Library for the corresponding images.
No image uploads are performed.
The images must already exist within the WordPress Media Library.

Step 4 – Featured Image Assignment
The correct featured image is identified and assigned.

Step 5 – Gallery Synchronisation
Gallery images are attached in the correct order.

Synchronisation Methods

Manual / Urgent Sync

Used when immediate synchronisation is required.
The user simply:

1. Enter one or more SKUs
2. Click Sync
3. Review the results

This method is ideal for newly added products.

Weekly Empty Gallery Scan

This process runs automatically via WordPress Cron. The plugin:
1. Reviews WooCommerce products
2. Identifies products that have no gallery images attached
3. Retrieves image information from Stock2Shop
4. Synchronises the gallery

Out-of-stock products are ignored during this process.

Full Catalogue Audit

This is an administrative maintenance tool.
The audit compares:
• WooCommerce image assignments
• Stock2Shop image assignments

Any differences can be identified and corrected.
Because this process may involve thousands of products and hundreds of API requests, it is restricted to authorised administrators.

User Permissions

Store Administrators

Store administrators can:

  • Perform manual SKU synchronisation
  • View plugin status
  • Enable or disable weekly synchronisation

YBO Administrators

Advanced functions are restricted to authorised YBO administrators:

  • Full Catalogue Audit
  • Queue Management
  • Advanced Diagnostics
  • Performance Tuning

Configuration Settings

API Limit Per Request

Controls how many products are retrieved from Stock2Shop in a single request.
Higher values increase performance but may place additional load on the server.
Recommended value:

10

Batch Size

Controls how many products are processed during a single synchronisation batch.
Recommended value:

3

Delay Between Batches

Controls the pause between processing batches.
This reduces:
• API load
• Server load
• Cloudflare rate limiting

Recommended value:

180 Seconds

Maximum Fallback Pages

Used when searching for products through the Stock2Shop API.
The plugin will stop searching after the configured number of pages.

Recommended value:

50

Performance Considerations

The plugin is designed to:
• Minimise API requests
• Avoid duplicate processing
• Respect Cloudflare rate limits
• Operate safely on large catalogues

For large stores containing thousands of products, synchronisation is performed in controlled batches.

Support

This plugin is a custom-developed solution by YBO Digital.

Project information, updates and support documentation: https://www.ybo.digital/project/s2s-image-linker/

Support requests:
support@ybo.digital