The plugin is dependant on WooCommerce since it targets the address related form fields of WooCommerce.
- An accessible
WordPresssite that you have administration rights to. WooCommerceplugin to be installed and activated on that site.
- Clone the repository with either option:
zip file of the repository, provided by github- Extract or Copy the files into a new/empty folder and assign to that folder an appropriate name (for example,
pro6pp).
- Extract or Copy the files into a new/empty folder and assign to that folder an appropriate name (for example,
- zip file with only the required files
- Can be installed directly on WordPress via the
Plugin->Add Newsection.
- Can be installed directly on WordPress via the
- Copy or Upload the folder inside the wordpress' plugin folder (ie:
your_WordPress_site/wp-content/plugins/). - Activate the plugin by visiting the administration page of your WordPress site and selecting to
Activatethe plugin.
- Navigate to a WooCommerce's address form (i.e. edit-account).
- Select either
NetherlandsorBelgiumas your country. - Fill in your
postcode. - Fill in your
streetnumber. - Continue with editing the rest of the form fields.
- Address related fields will be automatically filled in with the appropriate values.
If you would like to contribute to the project, you are more than welcome. Here are some guidelines to keep in mind.
- Follow the conventions that are used in the files.
- Spaces are preferred over tabs.
- Max length of line: 80 characters
- Document any new code you introduce.
- Before submitting a pull request, test and lint your code.
PS. Tests are mandatory!
Tests are important and currently missing.
We use Travis-CI to run our tests remotely and wp-cli on the development workstations.
Tests are found inside the tests folder.
In the root of the test folder:
bootstrap.php: Loads test environment dependencies.test-*.php: Test files executed byphpunitjs_tests: Folder containing javascript tests executed bycasperjs.
Note: The php test files should always start with the test- prefix, where the javascript test files should be alphabetically ordered if the execution order is important.
bin: Folder containing scripts that setup the test environment and Scripts executed by Travis-CI based on test results.
pro6pp_autocomplete.php:
The main file that initialises the pro6pp plugin.
In this file plugin functions and variables are defined for internal usage. It's the starting point of the plugin.
pro6pp.php:
This is the main class of the plugin.
Hooks into the appropriate WordPress and WooCommerce functionality.
It also implements all functionality necessary to communicate with the pro6pp service and the front-end.
settings.php: Deals with the user defined settings
templates:
This folder contains HTML template files (php and html combined). Any variables used in templates are defined in the settings classbefore include-ing the file.
Documentation on how to build a plugin can be found on wordpress's site: http://codex.wordpress.org/WordPress_APIs
Documentation of WooCommerce can be found on the WooCommerce's site: http://docs.woothemes.com/wc-apidocs/index.html