WP Manifestindependent plugin directory
manifest / ecommerce / rug-simple

Rug Simple

Rug Simple is a WordPress plugin for importing rug product data from a third-party API into WooCommerce. It creates WooCommerce products, maps rug attributes into product meta and taxonomies, imports product images, supports rental/sale product behavior, and provides admin tools for API client setup, product import, and import logs.

by Asif Rasheed · github.com/asifrasheedprovelopers/rug-simple

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/asifrasheedprovelopers/rug-simple/archive/refs/heads/master.zip

Readme

Rug Simple

Rug Simple is a WordPress plugin for importing rug product data from a third-party API into WooCommerce. It creates WooCommerce products, maps rug attributes into product meta and taxonomies, imports product images, supports rental/sale product behavior, and provides admin tools for API client setup, product import, and import logs.

Requirements

  • WordPress
  • WooCommerce
  • PHP with standard WordPress HTTP and media functions enabled
  • A third-party Rug API base URL
  • A valid customer email/API client for the Rug API

Optional integrations:

  • Contact Form 7, for rental inquiry forms
  • Gravity Forms, for pre-populating product SKU fields
  • WOOF/HUSKY product filters, for heading tag customization

Installation

  1. Copy the rug-simple folder into wp-content/plugins/.

  2. Add the Rug API base URL to wp-config.php:

    define('RUG_BASEURL', 'https://your-api-base-url.com');
  3. Activate Rug Simple from Plugins in WordPress admin.

  4. Go to Rug Settings and enter the customer email address.

  5. Click Create Client to create/validate the API client.

  6. Set the product import limit and optional skip value.

  7. Click Import Products to import products into WooCommerce.

Features

  • Creates simple WooCommerce products from Rug API data.
  • Imports product title, description, SKU, regular price, sale price, dimensions, weight, stock data, taxable status, dates, and custom rug metadata.
  • Downloads product images into the WordPress Media Library and sets featured/gallery images.
  • Creates and assigns WooCommerce categories, product tags, and rug-specific taxonomies.
  • Supports rental, sale, and rental-plus-sale product categorization.
  • Adds rental inquiry behavior and rental pricing display on product pages.
  • Adjusts add-to-cart behavior for rental-only and mixed rental/sale products.
  • Adds a Rug Product Category column to the WooCommerce products list.
  • Runs a daily WordPress cron task to fetch API updates and insert/update products.
  • Stores import logs in wp-content/rug-import-logs.log.
  • Provides an Import Logs admin page with a clear-log action.

Custom Taxonomies

The plugin registers these taxonomies for WooCommerce products:

  • rug_design
  • rug_type
  • rug_color
  • rug_size
  • rug_shape
  • rug_pattern
  • rug_product_type
  • rug_product_category
  • rug_construction_type
  • rug_country_origin
  • rug_collection

It also adds index routes for taxonomy landing pages such as /design/, /rug-type/, /color/, /size/, /shape/, /pattern/, /construction/, /country/, /rug-product-category/, and /collection/.

Settings

The Rug Settings page includes:

  • Customer email address
  • Create Client action
  • Delete Client action
  • Product import limit
  • Product skip value
  • Product import action
  • Sale/rental display options
  • Rug size display format
  • Contact form shortcode for rental product pages

Scheduled Updates

On activation, the plugin schedules the rugs_update_products cron event to run daily. The cron job:

  • Fetches all products from the API with pagination.
  • Compares API update timestamps against existing WooCommerce products.
  • Updates changed products.
  • Inserts new products.
  • Logs the import summary.

The cron event is unscheduled when the plugin is deactivated.

Notes

  • The plugin requires RUG_BASEURL; without it, the plugin shows an admin notice on the Rug Settings page.
  • Imported products are matched by SKU using the API ID value.
  • Products without required data, product category, or images are skipped and logged.
  • API tokens are stored in WordPress options and refreshed automatically when expired.

License

GPL-2.0+

Read the full README on GitHub →