| 开发者 | orderkrab |
|---|---|
| 更新时间 | 2026年9月4日 19:39 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[orderkrab_return_portal] shortcode — so customers can register returns without leaving the store.wp-content/plugins/.Yes. The plugin is a client for the OrderKrab fulfillment service; you'll need an account and an access token to use it.
No. WooCommerce is a hard requirement; the plugin will not bootstrap if WooCommerce isn't active.
WordPress 6.0 or higher and PHP 7.4 or higher.
Generate a portal token in OrderKrab admin → Returns → Settings, paste it under OrderKrab → Returns in WordPress, then add the "OrderKrab Return Portal" block (or the [orderkrab_return_portal] shortcode) to any page.
Reach the OrderKrab team via https://orderkrab.com.
_tmcartepo_data, _tm_epo*, _tmdata, _tmpost_data) are no longer forwarded, and duplicate or blank meta rows are dropped.GET /wp-json/orderkrab/v1/inventory/levels returns a paginated feed of products and variations with their stock fields (including global_unique_id on WooCommerce 9.2+), and POST /wp-json/orderkrab/v1/inventory/adjustments applies batched relative stock adjustments atomically, with per-adjustment idempotency keys so a retried request can never move stock twice. Both endpoints use the same HMAC signature as the existing OrderKrab endpoints.orderkrab_wc_stock_events_enabled filter.orderkrab_inventory_adjustments) that records applied adjustment idempotency keys; it is created on update and removed on uninstall.[orderkrab_return_portal] shortcode; both share one renderer, and height, max width, and language can be overridden per placement (e.g. [orderkrab_return_portal height="1100" lang="lt"]).shop_jwt, lang, color query parameters), forgiving URL handling (missing scheme, trailing slash), and a fit script that centers the iframe in the viewport at max width regardless of the theme's content column. Front-end assets load only on pages that actually render the portal.POST /wp-json/orderkrab/v1/orders/{id}/return, HMAC-signed like the other OrderKrab endpoints). When a return is approved in OrderKrab, the plugin records it on the order (meta + order note) and emails the customer the return shipping label with a download button and tracking link.POST /wp-json/orderkrab/v1/orders/status/batch) so OrderKrab can update up to 50 orders per request instead of one request per order. Batches are processed within a time budget and any orders not reached are returned as unprocessed for the caller to re-send; item updates are idempotent, so re-sending is safe and produces no duplicate order notes.skipped_final_status).X-Orderkrab-Plugin-Version header so the platform can detect per-store plugin capabilities.wc_rest_generate_keys() is not actually a public WooCommerce function in all installations. The plugin now falls back to inserting the WooCommerce REST API key row directly when WooCommerce's helper is unavailable, mirroring how WC's own admin UI generates keys internally.SHOW COLUMNS — it writes only the core columns and lets the database default any optional fields.wc-rest-functions.php on demand via WooCommerce's own WC()->plugin_path() getter (or WC_ABSPATH as a fallback). WooCommerce only auto-includes this file during REST API requests, not on every admin request, so a manual require_once is needed before calling wc_rest_generate_keys() from an admin context.uninstall.php handler that removes the integration user, the WooCommerce REST API key row, and all plugin options when the plugin is deleted./orderkrab/v1/shipping-points REST endpoint to protect against abuse of the merchant's upstream API.file_get_contents() SVG output in the parcel locker search with <img> tags pointing at the bundled asset URLs, in line with WordPress's escape-on-output rule.SHOW COLUMNS introspection queries). With WooCommerce now declared as a hard dependency, wc_rest_generate_keys() is always available.error_log() call that ran when WooCommerce REST helpers were unavailable./assets/ SVN folder instead.Requires Plugins header.WP_PLUGIN_DIR . 'woocommerce/' when locating WooCommerce REST helper files; the plugin now relies on WooCommerce's own getters and WC_ABSPATH constant.orderkrab-for-woocommerce.php).wp-stubs.php shim from the published build.wp_enqueue_style / wp_enqueue_script / wp_add_inline_style / wp_localize_script instead of inline <style> and <script> blocks.sanitize_text_field(), which could silently corrupt valid tokens.register_setting() registration with explicit type and sanitize_callback keys.load_plugin_textdomain(). WordPress automatically loads translations for plugins hosted in the directory since WordPress 4.6.defined( 'ABSPATH' ) guard to template files that execute code on inclusion.test-weight-logic.php development test harness from the published plugin.