承接 moxie-lean/woocommerce-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

moxie-lean/woocommerce-api

Composer 安装命令:

composer require moxie-lean/woocommerce-api

包简介

Woocommerce API endpoints for Lean Ecosystem.

README 文档

README

Description: Woocommerce API endpoints for Lean. Status: In development.

Version: 0.1.0

Getting Started

TODO

Endpoints

/ecommerce/cart

GET - Get the current user's cart.

POST - Add a product to the user's cart. product_id needs to be specified as an url parameter.

DELETE - Delete a product from the cart. item_key must be specified as an url parameter.

/ecommerce/order

GET - Get all logged users orders. If the user is not logged in, it returns an empty array.

POST - Create an order using the current user's cart. It returns the created order or an error.

/ecommerce/checkout

POST - It requires order_id parameter in URL. This endpoint tries to make the payment of the order passed as parameters.

/ecommerce/products

GET - Get all the products in an array.

Note: Please read the following considerations.

  1. The user has to be the owner of the order, or it should be a guest order.
  2. The plugin will try the first active payment gateway configured in your WP dashboard.
  3. More information can be required depending on the Gateway used. More information should be available in the order panel of the dashboard if the payment fails.

Error codes

The API can return some custom errors. You can find a explanation of these errors here. Also, all error responses should show an extra message to have a better understanding of the problem.

  • method_not_registered - This means you are trying to use a non allowed method. For example, if the endpoint only accepts POST and you are sending a GET.

  • request_error - This means your request could not be completed. This usually happens when you miss a parameter, or the requirements for this request were not met. More information can be found in the response message.

  • bad_configured - This means, there is some missing configuration to do in the Wordpress admin panel.

  • bad_permissions - This means, the user does not have permissions to perform the desired action.

  • internal_error - This means, something went wrong in the Server but we don't have more information. Server logs and/or Woocommerce log should have more information about this.

Hooks

There are some actions you can use to add functionality to this plugin.

Actions:

ln_wc_pre_order

Called before the order is created.

Parameters

$request;   // WP_REST_Request.
$cart;      // WC_Cart Cart instance.
ln_wc_after_order

Called after the order is created.

$request;   // WP_REST_Request.
$order;     // WC_Order Order instance after it has been created.
ln_wc_pre_update_guest_order

Called before the order shipping/billing address are updated (For Guest purchases only).

$request;   // WP_REST_Request.
$order;     // WC_Order Order instance.
ln_wc_after_update_guest_order

Called after the order shipping/billing address are updated (For Guest purchases only).

$request;   // WP_REST_Request.
$order;     // WC_Order Order instance.
ln_wc_pre_checkout

Called before the payment is processed. You can use this hook to, for example, load some information on the $_POST object.

$order_id;     // int Order id.
ln_wc_after_checkout

Called after the payment is processed.

$order_id;     // int Order id.

Filters:

moxie-lean/woocommerce-api 适用场景与选型建议

moxie-lean/woocommerce-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 54 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 06 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 moxie-lean/woocommerce-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 moxie-lean/woocommerce-api 我们能提供哪些服务?
定制开发 / 二次开发

基于 moxie-lean/woocommerce-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 54
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-06-06