Deskripzioa
Assign WooCommerce shipping classes to products by category, saving time and avoiding bulk edit limitations.
Requirements
- WordPress 5.0 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or higher, OR MariaDB 10.1 or higher
Automatic installation
Automatic installation is the easiest option — WordPress will handle the file transfer, and you won’t need to leave your web browser. To do an automatic installation of Shipping Class By Category For Woocommerce, log in to your WordPress dashboard, navigate to the Plugins menu, and click “Add New.”
In the search field type “Shipping Class By Category For Woocommerce” then click “Search Plugins.” Once you’ve found us, you can view details about it such as the point release, rating, and description. Most importantly, of course, you can install it by clicking “Install Now,” and WordPress will take it from there.
Manual installation
Manual installation method requires downloading the Shipping Class By Category For Woocommerce plugin and uploading it to your web server via your favorite FTP application. The WordPress codex contains instructions on how to do this here.
Detail Description
General
Shipping Class By Category For WooCommerce allows you to assign shipping classes to products based on their category in just a few clicks. Instead of manually editing each product or facing the limitations of bulk editing (which often fails with large product counts), this plugin lets you assign shipping classes efficiently, even for stores with thousands of products.
Key Features:
- Bulk Category Assignment: Assign shipping classes to all products within a selected category
- AJAX Batch Processing: Handles large product catalogs without server timeouts
- Automatic Assignment: New products automatically get shipping classes based on their category
- Custom Product Column: Optional shipping class column in the WooCommerce products table
- Progress Tracking: Real-time progress bar during bulk operations
- Error Handling: Robust error handling with retry mechanisms
- Security: Proper nonce verification and capability checks
Security Features
- Nonce Verification: All AJAX requests are protected with WordPress nonces
- Capability Checks: Only users with
manage_woocommercecapability can perform operations - Input Validation: All user inputs are properly sanitized and validated
- SQL Injection Protection: Uses WordPress’s
$wpdb->prepare()for all database queries
Performance Optimizations
- Batch Processing: Processes products in configurable batches (default: 25 products)
- Memory Management: Sets appropriate memory limits for large operations
- Efficient Queries: Uses optimized database queries to minimize server load
- Cache Management: Properly clears object cache after operations
- Retry Logic: Implements exponential backoff for failed requests
Why Use This Plugin?
WooCommerce’s built-in bulk editing feature is limited to 999 products and may cause server crashes on low-memory setups. Shipping Class By Category For WooCommerce solves this issue by using batch processing through AJAX, ensuring smooth operation even for large stores. This plugin automates the assignment process, allowing you to apply shipping classes to entire categories, saving hours of manual work.
Settings
Plugin gives you an option to show the shipping class assigned to the product on the product table in the WordPress admin panel products listing page
Troubleshooting
Common Issues
-
“WooCommerce is not active” error
- Ensure WooCommerce is installed and activated
- Check that WooCommerce version is 5.0 or higher
-
“Security check failed” error
- Try refreshing the page and attempting the operation again
- Ensure you’re logged in as an administrator
-
Slow processing
- The plugin processes products in batches to prevent server timeouts
- Large categories may take several minutes to process
- Monitor the progress bar for real-time updates
-
Memory errors
- The plugin automatically sets memory limits, but you may need to increase PHP memory limit on your server
- Contact your hosting provider if issues persist
Debug Mode
To enable debug logging, add this to your wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
Plugin errors will be logged to /wp-content/debug.log.
Support
For support, feature requests, or bug reports, please visit the plugin support page.
License
This plugin is licensed under the GPL v2 or later.
Note: This plugin is designed to work with WooCommerce’s standard shipping class system. For custom shipping solutions, additional configuration may be required.
MEG
-
Q: Can I assign different shipping classes to individual products within a category?
-
A: Yes! First assign the desired shipping class to the category, then manually edit individual products that need different shipping classes.
-
Q: Can I assign shipping classes to product variations?
-
A: Currently, this functionality is not available. It may be added in future versions.
-
Q: What happens if I have thousands of products in a category?
-
A: The plugin uses batch processing to handle large numbers of products efficiently. It processes products in small batches (default: 25) to prevent server timeouts.
-
Q: Is this plugin compatible with my theme?
-
A: Yes, this plugin works with any WordPress theme that supports WooCommerce.
Berrikuspenak
Ez dago berrikuspenik plugin honentzat.
Laguntzaileak eta Garatzaileak
“Shipping Class By Category For Woocommerce” software librea da. Ondoko pertsonek egin dizkiote ekarpenak plugin honi.
LaguntzaileakItzul zaitez Shipping Class By Category For Woocommerce zure hizkuntzara.
Garapena interesatzen zaizu?
Araka kodea, begiratu SVN biltegia edo harpidetu garapen erregistrora RSS bidez.
Aldaketen loga
Version 1.1.1
- UX Improvement: Categories are now sorted alphabetically in both the assignment dropdown and overview table
- Better Organization: Makes it easier to find specific categories in large stores
- Security Improvements: Enhanced nonce verification and input validation
- Code Quality: Refactored code structure with proper separation of concerns
- Documentation: Added comprehensive PHPDoc blocks and inline comments
- Error Handling: Improved error handling and user feedback
- Performance: Optimized database queries and batch processing
- Standards: Updated to follow WordPress coding standards
- Fixed JavaScript and CSS enqueuing
- Improved batch processing stability
1.0.3
Woocommerce required check added.
1.0.2
JavaScript and Style CSS are enqueued.
1.0.1
- Shipping Class assignment using Batch (Ajax basis) so server timeout does not happen on low memory servers if there are too many products in a category.
1.0.0
- Plugin is introduced.

