We appreciate your interest in contributing to the Sheet Wise Plugin, a tool that seamlessly syncs WordPress data to Google Sheets. This guide will help you get started with contributing, whether you're fixing bugs, adding new features, or improving documentation.
- Getting Started
- Forking the Repository
- Making Changes
- Commit Messages
- Submitting Your Pull Request
- Code of Conduct
- Generating Documentation
Before contributing, make sure you have the following:
- Node.js v18 (required for running build scripts and development tasks).
- PHP 7.4 or higher (required to run WordPress and the plugin).
- A local copy of the Sheet Wise plugin repository.
-
Clone the repository:
git clone https://github.com/sapayth/sheet-wise.git
-
Navigate to the project directory:
cd sheet-wise
-
Install PHP and Composer dependencies: If you don't have Composer installed, download and install it from getcomposer.org.
composer install
-
Install JavaScript (Node.js) dependencies:
npm install
-
Set up the plugin in your local WordPress environment.
To contribute, please fork the repository and create a pull request with your changes:
- Fork the repository: Click the "Fork" button at the top-right of the GitHub page.
- Clone your fork to your local machine:
git clone https://github.com/your-username/sheet-wise.git
When making changes, follow these guidelines:
- Follow WordPress coding standards for PHP, JavaScript, and CSS.
- Ensure consistent indentation (4 spaces per indentation level).
- Provide descriptive commit messages explaining the purpose of the changes.
- Use predefined placeholders (like
[[first_name]]
,[[user_login]]
) when mapping WordPress data to Google Sheets, as seen in the integration setup guide.
-
Create a new branch for each feature or bug fix:
git checkout -b feature/your-feature-name
-
Implement your changes, ensuring that the new feature or fix works with the existing hooks and Google API integrations.
-
Test thoroughly. Use the provided hooks like
user_register
,save_post
, andwp_insert_comment
to test data synchronization with Google Sheets. -
Commit your changes:
git add . git commit -m "feat: Add new hook for syncing comments"
If you're updating or adding documentation:
- Ensure that the step-by-step guide in
readme.txt
is clear. - Update the FAQ section if needed to answer common questions.
- Ensure that all instructions related to Google API setup are up-to-date.
We follow a consistent commit message format:
- feat: A new feature.
- fix: A bug fix.
- docs: Documentation updates.
- style: Formatting changes (no code changes).
- refactor: Refactor code (no changes to functionality).
- perf: Performance improvements.
- test: Add or modify tests.
Once you're ready to submit your changes:
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Open a pull request (PR) to the main repository, describing your changes in detail.
-
Ensure your PR is linked to any relevant issues.
-
The maintainers will review your PR and may request changes.
By participating in this project, you agree to abide by the Contributor Covenant Code of Conduct.
To generate documentation using PHP Documentor, follow these steps:
-
Download the
phpDocumentor.phar
file from the official PHP Documentor website:https://github.com/phpDocumentor/phpDocumentor/releases
-
Generate the documentation:
using bash
php phpDocumentor.phar
using npm
npm run phpdoc
-
The generated documentation will be available in the
docs
directory as specified in thephpdoc.dist.xml
configuration file.