Directo API plugin
The Estonian Directo CRM API integration plugin for the WooCommerce
by JussiNet · github.com/jussipalanen/directo-api-wp-plugin · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/jussipalanen/directo-api-wp-plugin/archive/refs/heads/main.zipReadme
Directo API WooCommerce integration
Intro
Directo API integration plugin (or an extension) for the WooCommerce products, customers (users), and orders.
Setup
- Run the
composer installfile under thejussinet-plugindirectory. - Tip: If you are using this as an extension for parent plugin e.g
jussinet-plugin, remember to add the class$directo_api = new DirectoAPIsomewhere PHP file. - Login into the WordPress admin e.g.
https://yoursite.localhost/wp/wp-admin, and select theDirecto API>Settingson the sidebar - Fill in the
API keyandEnvironment - Save the settings by click the "Update" button on the right sidebar
Requirements
- WordPress
- PHP
- MySQL/MariaDB
- Advanced Custom Fields (ACF)
Mappings
Product
If you want to update or create new products from Directo API to the WooCommerce products, just run the CLI command in the WordPress root directory wp directo product sync or click the Fetch from Directo API on the admin bar of WooCommerce products view. The source code of product mapping can be found in file /Directo/Handler/ProductHandler.php
Useful commands (e.g)
If you run the command line with the updatable fields. The code is a required field and will not be removed from the updateable fields list.
wp directo product sync- (Default command line, create and update products)
wp directo product sync --codes=1296A,1446A- (Run only specific products with the codes, create and update products)
wp directo product sync --fields=barcode,image,price,saleprice- (Run all products, create, and update products. Update only the specific fields)
wp directo product sync --exclude_fields=barcode,image,price,saleprice- (Run all products, create, and update products. Skips the specific fields)
wp directo product sync --modes=create- (Run all products, create only the new products) The allowed modes are
create,updateanddelete.Supported fields
- (Run all products, create only the new products) The allowed modes are
- name
- slug
- description
- status
- image
- weight
- stock
- price
- saleprice
- sku
- region
- product_tag
- product_cat
- producer
- attributes
- code
- unit
- barcode
- shown_web
- product_price_alte
- product_price_alt_sale
- product_abv
- product_year
- product_volume
- product_sugar
- datafields
Stocklevel
How to update the stocks for the products? Run this command in command line. The code is required for the product.
wp directo stocklevel sync- (Run all products)
wp directo stocklevel sync --codes=1296,1296A- (Run only the specific products with the given codes.)
Customer
TODO
- (Run only the specific products with the given codes.)
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| 1.0.0 | Sep 11, 2023 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.