Refactor plugin with improved architecture and new features
All checks were successful
Create Release / build (push) Successful in 5s
All checks were successful
Create Release / build (push) Successful in 5s
- Eliminated code duplication by creating common HTTP request function - Added configurable SSL verification setting for development/production - Implemented smart caching system with 1-hour cache duration - Enhanced admin interface with cache management and better styling - Improved error handling and user experience - Added comprehensive documentation and troubleshooting guide - Updated README with new features and configuration options
This commit is contained in:
47
README.md
47
README.md
@@ -1,6 +1,6 @@
|
||||
# fourth-wall-embed-wp
|
||||
|
||||
A WordPress Plugin to embed a Fourthwall store or individual products.
|
||||
A WordPress Plugin to embed a Fourthwall store or individual products with advanced caching and configuration options.
|
||||
|
||||
### How to use the plugin
|
||||
|
||||
@@ -8,6 +8,18 @@ A WordPress Plugin to embed a Fourthwall store or individual products.
|
||||
* Upload the Plugin to WordPress
|
||||
* In the WordPress Dashboard, Navigate to the Fourthwall settings page, and paste your store URL.
|
||||
|
||||
#### Configuration Options
|
||||
|
||||
**Store URL**: Enter your Fourthwall store URL (e.g., `https://your-store.fourthwall.com`)
|
||||
|
||||
**SSL Verification**:
|
||||
- **Enabled (Recommended)**: Use for production sites to ensure secure connections
|
||||
- **Disabled**: Use only for local development when SSL certificates are not properly configured
|
||||
|
||||
**Cache Management**:
|
||||
- Content is automatically cached for 1 hour to improve performance
|
||||
- Use the "Clear Cache" button if products are not updating
|
||||
|
||||
#### Display your entire store
|
||||
To display your entire Fourthwall store on a page, use the shortcode:
|
||||
```[fourthwall]```
|
||||
@@ -19,10 +31,43 @@ To display an individual product from your Fourthwall store, use the shortcode w
|
||||
You can also display the product description by setting the `show_description` attribute to "true":
|
||||
```[fourthwall_single url="https://your-store.fourthwall.com/products/product-name" show_description="true"]```
|
||||
|
||||
### Features
|
||||
|
||||
- **Smart Caching**: Automatic caching system reduces server load and improves performance
|
||||
- **Configurable SSL**: Toggle SSL verification for development vs production environments
|
||||
- **Error Handling**: Graceful fallbacks and clear error messages
|
||||
- **Admin Interface**: User-friendly settings page with clear instructions
|
||||
- **Cache Management**: Manual cache clearing for troubleshooting
|
||||
- **Responsive Design**: CSS styling for both frontend and admin areas
|
||||
|
||||
### Requirements
|
||||
* WordPress 6.0 or higher
|
||||
* PHP 7.4 or higher
|
||||
* Active Fourthwall store
|
||||
* cURL extension enabled
|
||||
|
||||
### Performance Notes
|
||||
|
||||
- Content is cached for 1 hour to reduce API calls to Fourthwall
|
||||
- Cache automatically refreshes when content changes
|
||||
- Manual cache clearing available in admin settings
|
||||
- SSL verification can be disabled for local development
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
**Products not updating?**
|
||||
- Clear the cache using the "Clear Cache" button in admin settings
|
||||
- Check your store URL is correct
|
||||
- Verify SSL verification setting matches your environment
|
||||
|
||||
**SSL errors in development?**
|
||||
- Disable SSL verification in admin settings (development only)
|
||||
- Ensure proper SSL certificates in production
|
||||
|
||||
**403 Forbidden errors?**
|
||||
- Fourthwall may be blocking automated requests
|
||||
- Check if your store is publicly accessible
|
||||
- Contact Fourthwall support if issues persist
|
||||
|
||||
This plugin allows you to integrate your Fourthwall store directly into your WordPress site, either showing your complete product collection or featuring specific products individually.
|
||||
|
||||
|
Reference in New Issue
Block a user