אקונומיקה יעקבי 2 ליטר
# WordPress Plugin Packaging Guide ## Folder Structure Create the following folder structure on your computer: ``` elementor-shipping-checker/ ├── elementor-shipping-checker.php (main plugin file) ├── widgets/ │ └── shipping-checker-widget.php ├── assets/ │ ├── shipping-checker.js │ └── shipping-checker.css └── readme.txt (optional) ``` ## Step-by-Step Instructions ### 1. Create the Main Plugin Directory - Create a new folder called `elementor-shipping-checker` ### 2. Create the Main Plugin File - Inside the folder, create `elementor-shipping-checker.php` - Copy the main plugin code (the large PHP block from the previous artifact) ### 3. Create the Widgets Subfolder - Create a `widgets` folder inside `elementor-shipping-checker` - Create `shipping-checker-widget.php` inside the `widgets` folder ### 4. Create the Assets Subfolder - Create an `assets` folder inside `elementor-shipping-checker` - Create both `shipping-checker.js` and `shipping-checker.css` files ### 5. Optional: Create readme.txt Create a `readme.txt` file with plugin information: ``` === Elementor Shipping Checker === Contributors: yourname Tags: elementor, woocommerce, shipping, widget Requires at least: 5.0 Tested up to: 6.2 Stable tag: 1.0.0 License: GPL v2 or later A simple plugin that adds a shipping address checker widget to Elementor. == Description == This plugin adds a widget to Elementor that allows customers to check if shipping is available to their address using WooCommerce shipping zones. == Installation == 1. Upload the plugin files to the `/wp-content/plugins/elementor-shipping-checker` directory 2. Activate the plugin through the 'Plugins' screen in WordPress 3. Make sure Elementor and WooCommerce are installed and activated 4. Use the widget in Elementor under WooCommerce Elements == Changelog == = 1.0.0 = * Initial release ``` ## File Contents ### Main Plugin File (`elementor-shipping-checker.php`) ```php ``` ## Creating the ZIP File ### Method 1: Using File Explorer (Windows) or Finder (Mac) 1. Select the `elementor-shipping-checker` folder (not the contents, but the folder itself) 2. Right-click and choose "Compress" (Mac) or "Send to > Compressed folder" (Windows) 3. Rename the zip file to `elementor-shipping-checker.zip` ### Method 2: Using Command Line Navigate to the parent directory of your plugin folder and run: ```bash zip -r elementor-shipping-checker.zip elementor-shipping-checker/ ``` ## WordPress Installation 1. Go to WordPress Admin > Plugins > Add New 2. Click "Upload Plugin" 3. Choose your `elementor-shipping-checker.zip` file 4. Click "Install Now" 5. Activate the plugin ## Important Notes - The main plugin file must have the same name as the folder - Make sure all file paths are correct - Test the zip by extracting it to verify the structure - The folder name should not contain spaces or special characters - WordPress expects the main plugin file to be in the root of the plugin folder ## Troubleshooting If the plugin doesn't appear after upload: - Check that the main PHP file has the proper plugin header - Verify the folder structure matches exactly - Ensure file permissions are correct (755 for folders, 644 for files) - Check for PHP errors in WordPress debug log