| 开发者 | trasek |
|---|---|
| 更新时间 | 2026年7月30日 07:31 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp_unslash(), sanitize_text_field(), sanitize_textarea_field(), sanitize_email(), absint() and related WordPress APIs.phpcs.xml.dist ruleset for WordPress Coding Standards, PHP 7.4+ and WooCommerce capability awareness.phpcs.xml.dist configuration and has been checked against WordPress Coding Standards. Development checks used during preparation include PHP linting, JavaScript syntax checks and PHPCS with WPCS/PHPCompatibilityWP tooling.
Support
If this plugin helps your store, you can support the work here: https://buymeacoffee.com/traskowski
udx-easy-returns-refunds-for-woocommerce folder to /wp-content/plugins/.[udxretwc_return_form] shortcode on activation.Yes. WooCommerce 7.0 or higher is required.
The plugin never moves money on its own. A store manager reviews each request and processes the refund from the return request screen. There is an optional auto-approval setting, but it only changes the request status to approved — it does not refund any payment. When a manager processes a refund, they can also choose to refund the payment. If the order's payment gateway supports API refunds, the amount is returned through the gateway automatically; otherwise WooCommerce records the refund and the payment is returned manually. The return request and order statuses are updated accordingly.
Yes. Guests verify ownership with Order ID, billing email and a one-time code sent by email.
Yes. Store owners can enable partial returns so customers can select specific items and quantities.
Yes, if uploads are enabled. The plugin accepts JPG, PNG, WebP, GIF and PDF files up to 5 MB each, with a maximum of 3 files per request.
When bundle support is enabled, bundle groups are represented by one selectable bundle item. Child products are displayed as included items and are not returned separately.
Yes. Store owners can enable or disable return eligibility for subscription orders and subscription line items.
Yes. The plugin declares compatibility with WooCommerce High-Performance Order Storage.
Uploaded evidence files are validated by file extension and by real MIME type (the client-reported type is not trusted), are size-limited, are bound to the uploading customer or guest, are stored as private attachments, and executable types such as PHP are rejected. As an additional, strongly recommended hardening step, configure your web server so the WordPress uploads directory cannot execute PHP or other scripts:
.htaccess file in wp-content/uploads/ that denies access to PHP files (for example, a <Files *.php> block with Require all denied).\.php$ under wp-content/uploads/.Yes. The plugin exposes actions and filters across its lifecycle so you can extend behavior without modifying core files. Actions:
udxretwc_before_return_request_created ( $data, $order ) — before a request is created.udxretwc_return_request_created ( $request_id, $data ) — after a request is created.udxretwc_return_request_submitted ( $request_id ) — after a request is fully submitted (triggers emails).udxretwc_return_status_changed ( $request_id, $new_status, $old_status ) — on any status change.udxretwc_status_changed_{status} ( $request_id, $old_status ) — dynamic, e.g. udxretwc_status_changed_approved.udxretwc_note_added ( $request_id, $note, $author ) — after any note is added.udxretwc_admin_note_added ( $request_id, $note ) — after an admin note is added.udxretwc_return_request_cancelled ( $request_id ) — after a customer cancels a request.udxretwc_before_refund_processed ( $request_id, $order, $refund_args ) — before the WooCommerce refund is created.udxretwc_refund_processed ( $request_id, $refund, $order ) — after the refund is created.udxretwc_file_uploaded ( $attachment_id, $upload_owner ) — after an evidence file is uploaded.udxretwc_send_verification_code ( $email, $code, $order ) — when a guest verification code is issued.udxretwc_before_return_form / udxretwc_after_return_form ( $order, $is_guest ) — around the return form.udxretwc_before_my_account_requests / udxretwc_after_my_account_requests ( $requests ) — around the My Account list.udxretwc_before_template / udxretwc_after_template ( $template, $args ) — around any plugin template.udxretwc_settings_page_notices () — fires at the top of the plugin's WooCommerce → Settings → Returns tab, before any fields; useful for adding your own integration notices (e.g. a warehouse/OMS mapping note) without modifying this plugin.udxretwc_create_request_data ( $data ) — modify request data before saving.udxretwc_new_request_default_status ( $status, $data ) — set the initial status.udxretwc_can_change_status ( $allowed, $request_id, $new_status, $old_status ) — block status transitions.udxretwc_return_period_days ( $days, $order ) — per-order return window.udxretwc_item_is_returnable ( $is_returnable, $item, $order ) — exclude specific items.udxretwc_returnable_items ( $items, $order ) — adjust the full list of returnable items.udxretwc_return_reasons ( $reasons, $order ) — modify the available reasons.udxretwc_return_statuses ( $statuses ) — register or relabel statuses.udxretwc_request_type_labels ( $labels ) — modify request type labels.udxretwc_is_order_eligible ( $eligible, $order ) — final eligibility check.udxretwc_validate_submission ( $error, $data, $order ) — add custom submission validation (return WP_Error to reject).udxretwc_can_cancel_request ( $can_cancel, $request_id, $user_id ) — control cancellation.udxretwc_max_upload_size ( $bytes ) — maximum upload size.udxretwc_allowed_upload_extensions ( $extensions ) — allowed file extensions.udxretwc_allowed_upload_mimes ( $mimes ) — allowed MIME types.udxretwc_refund_line_items ( $line_items, $request_id, $order ) — adjust refund line items.udxretwc_refund_total ( $refund_total, $request_id, $order ) — adjust the refund total.udxretwc_restock_items ( $restock, $request_id, $order ) — control restocking.udxretwc_refund_args ( $refund_args, $request_id, $order ) — adjust wc_create_refund() arguments.udxretwc_should_mark_order_refunded ( $should, $order, $request_id ) — control order status update.udxretwc_template_path ( $path, $template, $args ) — override a template path.udxretwc_template_args ( $args, $template ) — modify template arguments.Go to WooCommerce → Settings → Returns → Automation and pick a WooCommerce order status under "Auto-Complete on Order Status". Whenever an order reaches that status, any Approved return request linked to it is automatically moved to Completed — no code required.
This works with BaseLinker (or any other warehouse/OMS) without an extra API token or webhook: BaseLinker already pushes order status changes into WooCommerce through the standard WooCommerce REST API once you map its own "returned" status to a WooCommerce order status in its own panel. If you don't already have a suitable WooCommerce order status for this, register a dedicated one first with register_post_status() plus the wc_order_statuses filter, then select it here.
The actual money refund stays a deliberate, manual step — use the "Process Refund" button on the return request detail screen.
Need more than a single global target status? Use the udxretwc_settings_page_notices action to add your own notice to this settings screen, or build fully custom logic on the standard WooCommerce woocommerce_order_status_changed hook combined with the plugin's _udxretwc_order_id post meta and UDXRETWC_Post_Types::update_status().
Yes. The plugin's source language is English (text domain udx-easy-returns-refunds-for-woocommerce). Translations, including the readme description, are managed through translate.wordpress.org. A Polish translation is bundled with the plugin as a fallback until directory translations are complete.
udxretwc_settings_page_notices action, fired at the top of the Settings → Returns tab, for adding custom integration notices without modifying the plugin.erfwc prefix after the udxretwc rename, breaking admin AJAX (status/notes/refund/rate prompt), the frontend return form (guest verification, item selection, upload, cancel), all plugin styling and the block editor registration.