Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

How to setup the plugin development environment

Tim Nolte edited this page May 6, 2020 · 1 revision

This page will guide you through the process of setting up the plugin development environment on your local machine. It should work on Linux, macOS, or Windows 10 with the Linux Subsystem.

Pre-requisites

Before starting, make sure you have the following software installed and working on your machine:

  1. Git to clone the WooCommerce repository (or your fork of the WooCommerce repository).
  2. NPM to install Node packages used to build assets and other tasks.
  3. Composer to install PHP packages required by the plugin & WooCommerce. It's also necessary to use the PHP CodeSniffer that ensures your code follows code standards.
  4. Docker & Docker Compose(separate download on Linux)

Clone the repository

In your terminal, replacing USER_NAME with your GitHub username::

$ git clone [email protected]:USER_NAME/woocommerce-local-pickup-time.git

Install dependencies

  1. Change to plugin clone directory:
$ cd ~/<your clone path>/woocommerce-local-pickup-time
  1. Install Composer dependencies:
$ composer install
  1. Install NPM dependencies:
$ npm install
  1. Setup run-time version of WooCommerce:
$ cd ~/<your clone path>/woocommerce-local-pickup-time/vendor/woocommerce/woocommerce
$ npm install
$ composer install
$ npm run build

Setup Local Docker Environment

  1. Install WordPress Core instance:
$ npm run env install
  1. Startup Local Development instance:
$ npm run env start
  1. Shutdown Local Development instance:
$ npm run env stop

Local Development Environment Advanced Topics

This plugin uses the NPM WordPress scripts package for local development and builds.

Clone this wiki locally