WP Manifestindependent plugin directory
manifest / integrations / directo-api-wp-plugin

Directo API plugin

The Estonian Directo CRM API integration plugin for the WooCommerce

by JussiNet · github.com/jussipalanen/directo-api-wp-plugin · website

0stars
0forks

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.zip

Readme

Directo API WooCommerce integration

Intro

Directo API integration plugin (or an extension) for the WooCommerce products, customers (users), and orders.

Setup

  • Run the composer install file under the jussinet-plugin directory.
  • Tip: If you are using this as an extension for parent plugin e.g jussinet-plugin, remember to add the class $directo_api = new DirectoAPI somewhere PHP file.
  • Login into the WordPress admin e.g. https://yoursite.localhost/wp/wp-admin, and select the Directo API > Settings on the sidebar
  • Fill in the API key and Environment
  • 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, update and delete.

      Supported fields

  • 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

Read the full README on GitHub →

Releases

TagPublished
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.