A centralized repository of patches for WordPress plugins maintained by SOZO Design.
This repository contains patches for various WordPress plugins that we commonly use across client projects. These patches address issues that haven't yet been fixed by plugin authors or provide temporary workarounds for compatibility problems.
sozo-wp-patches/
├── README.md
├── patches/
│ ├── plugin-slug/
│ │ ├── issue-description.patch
│ │ └── another-fix.patch
│ └── another-plugin/
│ └── fix-description.patch
- Add this plugin to your
composer.json
:
"require": {
"cweagans/composer-patches": "^1.7"
}
- Configure the patches you want to apply:
"extra": {
"patches": {
"woocommerce/woocommerce": {
"Fix checkout issue with PayPal": "https://raw.githubusercontent.com/sozo-design/sozo-wp-patches/main/patches/woocommerce/fix-paypal-checkout.patch"
}
}
}
- Run
composer update
to apply the patches.
We welcome contributions from the WordPress community! If you've created a patch for a plugin issue:
- Fork this repository
- Add your patch to the appropriate plugin directory in
patches/
- Submit a pull request with clear documentation about what your patch fixes
Follow these steps to create and test patches for WordPress plugins:
Open Terminal and change to the plugin directory:
cd web/app/plugins/plugin-name
Initialize a Git repository to track changes:
git init && git add .
Edit the plugin files to fix the issue you're addressing.
Generate a patch and move it to your patches directory:
git diff -w > fix_issue_name.patch
Dry Run - Check if patch can be applied:
git apply --check patches/plugin-name/fix_issue_name.patch --directory=web/app/plugins/plugin-name
Check what's failing:
git apply --reject --whitespace=fix patches/plugin-name/fix_issue_name.patch --directory=web/app/plugins/plugin-name
For assistance with patches or to report issues:
- Open an issue in this repository