Popis
Products Showcase – Shopify Integration is a powerful WordPress plugin that allows you to display your Shopify products and collections directly on your WordPress website using beautiful, responsive carousels built with native Gutenberg blocks.
Features
- Native Gutenberg Block – Built with React, zero external dependencies for block functionality
- Beautiful Carousels – Touch-friendly product carousels powered by Embla Carousel
- Smart Product Display – Show individual products or entire collections
- Color Swatches – Visual product color options with hover effects
- Fully Responsive – Optimized for all screen sizes and devices
- Performance Optimized – Smart caching and lazy loading for optimal performance
- Live Search – Real-time product/collection search in block editor
- Stock Filtering – Automatically hides out-of-stock items
- Customizable Display – Control product limits and display options
- Two Display Modes – Carousel for multiple products, special layout for single product
- Modern Development – Built with @wordpress/scripts and webpack
Requirements
- WordPress 6.0 or higher
- PHP 8.1 or higher
- Node.js 18+ and npm 8+ (for development only)
- A Shopify store with Admin API access
Optional
- WPGraphQL plugin (for headless/decoupled WordPress setups)
Source Code
This plugin includes compiled JavaScript and CSS files. The source code is fully available:
- Source code repository: GitHub – HosseinKarami/products-showcase
- Source files location: The
src/directory contains all uncompiled source code (React components, SCSS files) - Build tool: The plugin uses @wordpress/scripts (Webpack) for compilation
- Development guide: See README.md for complete build instructions
To build from source:
npm install
npm run build
For development with hot reloading:
npm start
External Services
This plugin relies on the Shopify Admin API (a third-party external service) to function. The plugin connects to your Shopify store’s GraphQL API to retrieve product and collection information for display on your WordPress website.
What is the service and what is it used for?
Service Name: Shopify Admin API (GraphQL endpoint)
Service Provider: Shopify Inc.
Purpose: To fetch product and collection data from your Shopify store for display on your WordPress site
The Shopify API is the core service that provides all product information including:
* Product titles, descriptions, and pricing
* Product images and media
* Product variants and options (sizes, colors, etc.)
* Product availability and stock status
* Collection information and organization
What data is sent and when?
Data Transmitted to Shopify:
1. Shopify Store URL – Your store’s domain (e.g., your-store.myshopify.com) configured in plugin settings
2. OAuth Credentials – Client ID and Client Secret are used during the one-time OAuth authorization flow
3. Admin API Access Token – Obtained automatically via OAuth and used for all subsequent API requests
4. GraphQL Queries – Specific queries requesting product and collection data
When Data is Transmitted:
* In WordPress Admin: When you search for products or collections while editing content in the block editor
* On Frontend: When your website displays products to visitors (first view only, then cached)
* During Testing: When you test your API connection in the plugin settings page
* Manual Cache Clear: When you manually clear cached product data from the settings page
Important: The plugin includes smart caching (default: 1 hour) to minimize API requests. After the initial data fetch, subsequent page loads use cached data and do NOT make additional API calls until the cache expires.
Privacy and Data Protection
No Visitor Data Transmitted: This plugin does NOT send any personal information about your WordPress site visitors to Shopify. The only data transmitted is:
* Your store’s administrative credentials (configured by you)
* Product search queries (initiated by site administrators)
Server-Side Only: All API requests are made server-side from your WordPress installation. No client-side (browser) connections to Shopify are made.
Data Storage: Product information retrieved from Shopify is cached locally in your WordPress database. No data is sent back to Shopify.
Service Links and Legal Information
By using this plugin, you are subject to Shopify’s terms of service and privacy policies:
API Endpoint Format: https://{your-store}.myshopify.com/admin/api/2025-10/graphql.json
(The API version 2025-10 may be updated in future plugin releases to maintain compatibility)
Note: The domain shop.example.com may appear in the plugin as a placeholder fallback when no store is configured. This is a non-functional example domain—you must configure your actual Shopify store URL in Settings Shopify Products for the plugin to work.
Use Cases
- Showcase featured products on your blog
- Display seasonal collections on landing pages
- Add product carousels to content-heavy sites
- Create product highlights in editorial content
- Bridge content and commerce seamlessly
Configuration
Easy OAuth Setup
- Navigate to Shopify Products in WordPress admin
- Enter your Shopify Store URL (e.g.,
your-store.myshopify.com) - Paste your Client ID from Shopify
- Paste your Client Secret from Shopify
- Click „Connect to Shopify“
- You’ll be redirected to Shopify to authorize the connection
- After authorizing, you’re automatically redirected back – done!
The plugin automatically obtains the access token via secure OAuth and detects the latest Shopify API version.
Usage
Adding the Block
- Edit any page or post in WordPress
- Click the „+“ button to add a new block
- Search for „Shopify Products“
- Add the block to your content
Block Settings
All settings are available in the block sidebar (Inspector Controls):
Basic Settings
* Title: Optional heading for the block
* Description: Optional description text
Content Type
* Individual Products: Select specific products manually
* Collection: Display all products from a collection
Products Mode
* Search Products: Type to search and select products
* Products display with image preview
* Reorder: Use up/down arrows to change order
* Remove: Delete products from selection
Collection Mode
* Search Collection: Type to find collections
* Shows collection name and product count
* Product Limit: Control how many products to show (1-50)
Display Modes
Multiple Products – Displays as a carousel:
* Touch/swipe enabled on mobile devices
* Arrow navigation on desktop
* Automatically hides navigation if only 1 product
Single Product – Special two-column layout:
* Product image + info on left
* Product details on right
* Perfect for featured products
Customization
Custom CSS Classes
Target these CSS classes for custom styling:
css
/* Container */
.wp-block-products-showcase-products { }
.prodshow-shopify-block { }
.prodshow-container { }
/* Header */
.prodshow-title { }
.prodshow-description { }
.prodshow-cta-button { }
/* Carousel */
.prodshow-carousel { }
.prodshow-carousel-viewport { }
.prodshow-carousel-container { }
.prodshow-carousel-btn { }
/* Product Cards */
.prodshow-product-card { }
.prodshow-product-image { }
.prodshow-product-title { }
.prodshow-product-price { }
.prodshow-product-swatches { }
.prodshow-swatch { }
/* Single Product Layout */
.prodshow-single-product { }
.prodshow-single-info { }
Template Overrides
Copy templates to your theme for customization:
your-theme/
products-showcase/
block-template.php
product-card.php
The plugin will automatically use your theme templates if they exist.
Developer Documentation
REST API Endpoints
The plugin registers these REST API endpoints:
GET /wp-json/prodshow-shopify/v1/connection-status– Check API connectionGET /wp-json/prodshow-shopify/v1/search-products?query=shirt– Search productsGET /wp-json/prodshow-shopify/v1/search-collections?query=summer– Search collectionsPOST /wp-json/prodshow-shopify/v1/clear-cache– Clear product cacheGET /wp-json/prodshow-shopify/v1/cache-status– Get cache status
Hooks & Filters
Modify cache duration:
php
add_filter(‚prodshow_cache_duration‘, function($duration) {
return 2 * HOUR_IN_SECONDS;
});
Customize product data before display:
php
add_filter(‚prodshow_product_data‘, function($product) {
// Modify product data
return $product;
}, 10, 1);
Add custom product filtering:
php
add_filter(‚prodshow_filter_products‘, function($products) {
// Filter products array
return $products;
}, 10, 1);
Programmatic Usage
php
// Get Shopify API instance
$shopify_api = new PRODSHOW_Shopify_API();
// Search products
$products = $shopify_api->search_products('shirt');
// Search collections
$collections = $shopify_api->search_collections('summer');
// Fetch product data
$product = $shopify_api->fetch_product_data('gid://shopify/Product/123456');
// Fetch collection products
$products = $shopify_api->fetch_collection_products('gid://shopify/Collection/789', 12);
Build Scripts
bash
# Development - watch for changes
npm start
# Production build
npm run build
# Linting
npm run lint:js # Lint JavaScript
npm run lint:css # Lint styles
npm run lint:pkg-json # Lint package.json
# Formatting
npm run format # Auto-fix code style
# Create plugin zip
npm run plugin-zip
Troubleshooting
Products Not Showing
- Check API credentials in Settings Shopify Products
- Verify connection – Green checkmark should appear after saving
- Clear cache using button in settings
- Check product status – Only ACTIVE products are displayed
- Check stock – Out of stock products are automatically filtered
Block Not Appearing in Editor
- Rebuild assets: Run
npm run buildin plugin directory - Check browser console for JavaScript errors
- Clear browser cache and WordPress cache
- Verify file permissions on build directory
Search Not Working
- Check REST API – Visit
/wp-json/prodshow-shopify/v1/connection-status - Verify API credentials are correct
- Check browser console for errors
- Ensure your WordPress REST API is accessible
Build Errors During Development
- Ensure Node.js 18+ is installed
-
Clean install:
rm -rf node_modules package-lock.json npm install npm run build -
Check @wordpress/scripts version compatibility
Credits
- Built with Embla Carousel for smooth, touch-friendly carousels
- Powered by @wordpress/scripts for modern build tooling
- Inspired by modern e-commerce UX patterns
Support
For support, please visit:
* Plugin Support Forum
* GitHub Issues
* Documentation
Privacy Policy
This plugin connects to Shopify’s API to fetch product data. Product information is cached locally on your WordPress server. The plugin does NOT collect or transmit any personal data about your site visitors.
Third-Party Service: This plugin uses the Shopify Admin API. Please review Shopify’s privacy policy for information about how Shopify handles data.
Data Stored Locally: Product titles, descriptions, images, prices, and variants are cached in your WordPress database to improve performance and reduce API calls.
No Tracking: This plugin does not use cookies, does not track users, and does not send any analytics data to third parties.
Translation
The plugin is translation-ready:
- Text domain:
products-showcase - Translation files location:
/languages/directory - Use Loco Translate or Poedit to create translations
Contributing
Contributions are welcome! Please visit GitHub to:
* Report bugs
* Suggest features
* Submit pull requests
* Review the development guidelines
Made with ❤️ by Hossein Karami
Snímky obrazovky
Bloky
Tento plugin poskytuje 1 blok.
- Products Showcase Display Shopify products or collections in a beautiful carousel.
Instalace
Standard Installation
- Upload the plugin files to
/wp-content/plugins/products-showcase/, or install through the WordPress plugins screen - Activate the plugin through the ‚Plugins‘ screen in WordPress
- Go to Settings Shopify Products to configure your API credentials
- Add your Shopify store URL and Admin API access token
- Create or edit a page/post and add the „Shopify Products“ block
- Search and select products or a collection to display
Development Installation
For active development with hot reloading:
- Clone the repository:
git clone https://github.com/HosseinKarami/products-showcase.git - Navigate to plugin directory:
cd products-showcase - Install dependencies:
npm install - Start development server:
npm start(watches for changes) - Activate the plugin in WordPress
Creating Your Shopify App
- Log in to your Shopify Admin
- Go to Settings Apps and sales channels
- Click „Develop apps“
- Click „Create an app“ and name it (e.g., „WordPress Integration“)
- Go to the „Configuration“ tab
- Under „Admin API integration“, click „Configure“
- Enable the
read_productsscope and save - Under „Allowed redirection URL(s)“, add the Redirect URL shown in your WordPress plugin settings
- Go to the „API credentials“ tab
- Copy the Client ID and Client secret
Nejčastější dotazy
-
Do I need a Shopify account?
-
Yes, you need an active Shopify store to use this plugin. The plugin fetches product data from your Shopify store via the Admin API.
-
Does this plugin process payments?
-
No, this plugin only displays products. When users click on products, they’re redirected to your Shopify store to complete the purchase.
-
How often does product data update?
-
Product data is cached for 1 hour by default (configurable in settings). You can manually clear the cache from the settings page at any time to force a refresh.
-
Can I customize the appearance?
-
Yes! The plugin includes CSS classes that you can target with custom CSS. Advanced users can also override the template files by copying them to their theme.
-
Does it work with headless WordPress?
-
Yes! If you have WPGraphQL installed, the plugin automatically registers GraphQL types for querying product data in headless/decoupled WordPress setups.
-
Will this slow down my site?
-
No. The plugin uses intelligent caching to minimize API calls and only loads assets on pages where the block is used. Images are lazy-loaded for optimal performance.
-
Can I display products from multiple Shopify stores?
-
Currently, the plugin supports one Shopify store per WordPress installation. If you need multi-store support, please open a feature request on GitHub.
-
What happens if my Shopify API credentials change?
-
Click the „Disconnect“ button in Shopify Products settings, then reconnect using the OAuth flow with your new credentials. The plugin will automatically obtain a new access token.
-
Can I filter out certain products?
-
Out-of-stock products are automatically filtered by default. Developers can use the
prodshow_filter_productsfilter hook to implement custom product filtering logic.
Recenze
Autoři
Products Showcase – Shopify Integration je otevřený software. Následující lidé přispěli k vývoji tohoto pluginu.
SpolupracovníciPřeložte “Products Showcase – Shopify Integration” do svého jazyka.
Zajímá vás vývoj?
Prohledejte kód, podívejte se do SVN repozitáře, nebo se přihlaste k odběru protokolu vývoje pomocí RSS.
Přehled změn
1.1.0
- NEW: OAuth 2.0 Authentication – Easy one-click connection to Shopify using secure OAuth flow
- NEW: Auto API Version Detection – Automatically detects and uses the latest Shopify API version
- NEW: Simplified Setup – No more manual access token copying – just enter Client ID & Secret and click Connect
- NEW: Disconnect/Reconnect – Easy way to change Shopify credentials
- NEW: Refresh API Version – Button to manually refresh the detected API version
- Improved admin UI with better connection status display
- Enhanced security with OAuth state validation
1.0.0
- Initial release
- Native Gutenberg block integration
- Product carousel display with Embla Carousel
- Collection support with product limits
- Color swatches with visual options
- Live search autocomplete in editor
- Intelligent caching system (1 hour default)
- Responsive design for all devices
- Stock filtering (hides out-of-stock items)
- REST API endpoints for product/collection search
- WPGraphQL integration for headless WordPress
- Template override support
- Hooks and filters for developers






