{"id":197883,"date":"2024-08-14T14:43:24","date_gmt":"2024-08-14T14:43:24","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/discord-sale-notifications-for-woocommerce\/"},"modified":"2026-04-12T11:20:13","modified_gmt":"2026-04-12T11:20:13","slug":"discord-sale-notifications-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/sk.wordpress.org\/plugins\/discord-sale-notifications-for-woocommerce\/","author":23080833,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"3.2.0","stable_tag":"3.2.0","tested":"6.9.4","requires":"6.2","requires_php":"8.0","requires_plugins":null,"header_name":"WC Sale Discord Notifications","header_author":"Cral_Cactus","header_description":"Sends a notification to a Discord channel when a sale is made on WooCommerce.","assets_banners_color":"","last_updated":"2026-04-12 11:20:13","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/Cral-Cactus\/wc-sale-discord-notifications","header_author_uri":"https:\/\/github.com\/Cral-Cactus","rating":5,"author_block_rating":0,"active_installs":100,"downloads":67392,"num_ratings":5,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.8":{"tag":"1.8","author":"cralcactus","date":"2024-08-14 14:44:35"},"1.9":{"tag":"1.9","author":"cralcactus","date":"2024-09-14 12:15:37"},"2.0":{"tag":"2.0","author":"cralcactus","date":"2024-10-27 17:00:16"},"3.0":{"tag":"3.0","author":"cralcactus","date":"2025-08-31 16:02:55"},"3.1.2":{"tag":"3.1.2","author":"cralcactus","date":"2026-03-19 17:45:35"},"3.2.0":{"tag":"3.2.0","author":"cralcactus","date":"2026-04-12 11:20:13"}},"upgrade_notice":{"3.2.0":"<p>Shipping method field, drag-and-drop embed field order, and new\/returning customer field. Requires PHP 8.0+.<\/p>","3.1.2":"<p>Subscription-aware titles, correct currency display in Discord, and embed title filter. Requires PHP 8.0+.<\/p>","3.1.1":"<p>Customer notes only toggle, embed size trimming, webhook error logging, and code quality improvements. Requires PHP 8.0+.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":5},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3353404,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3353403,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.8","1.9","2.0","3.0","3.1.2","3.2.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3353430,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3353431,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Settings page under WooCommerce \u2192 Discord Notifications","2":"Image of a completed order Discord webhook"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[23972,4906,16281,332,286],"plugin_category":[45],"plugin_contributors":[230666],"plugin_business_model":[],"class_list":["post-197883","plugin","type-plugin","status-publish","hentry","plugin_tags-discord","plugin_tags-notifications","plugin_tags-orders","plugin_tags-sales","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-cralcactus","plugin_committers-cralcactus"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/discord-sale-notifications-for-woocommerce\/assets\/icon-128x128.png?rev=3353404","icon_2x":"https:\/\/ps.w.org\/discord-sale-notifications-for-woocommerce\/assets\/icon-256x256.png?rev=3353403","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/discord-sale-notifications-for-woocommerce\/assets\/screenshot-1.png?rev=3353430","caption":"Settings page under WooCommerce \u2192 Discord Notifications"},{"src":"https:\/\/ps.w.org\/discord-sale-notifications-for-woocommerce\/assets\/screenshot-2.png?rev=3353431","caption":"Image of a completed order Discord webhook"}],"raw_content":"<!--section=description-->\n<p>This plugin sends a Discord notification for WooCommerce order events. It uses native WordPress\/WooCommerce APIs and supports WooCommerce Custom Order Tables (HPOS). You can choose which order statuses trigger notifications, customize which details are included, set different webhook URLs and embed colors per status, and optionally remove product images from the embed.<\/p>\n\n<h3>Features<\/h3>\n\n<ul>\n<li><p>Customizable message fields:<\/p>\n\n<ul>\n<li>Order Status<\/li>\n<li>Payment Info<\/li>\n<li>Product Lines (names, qty, price)<\/li>\n<li>Product Options (add-ons \/ custom fields)<\/li>\n<li>Order Date<\/li>\n<li>Billing Info<\/li>\n<li>New or returning customer<\/li>\n<li>Shipping method (freight)<\/li>\n<li>Transaction ID<\/li>\n<li>Order Notes (customer and\/or internal)<\/li>\n<\/ul><\/li>\n<li><p>Initiating payment notification when a customer begins checkout (pending)<\/p><\/li>\n<li>Customer notes only toggle \u2013 exclude internal\/admin notes when Order Notes is included<\/li>\n<li>Option to disable product image in the embed<\/li>\n<li>Per-status webhook URL and embed color<\/li>\n<li>Duplicate-send protection via order meta (120s deduplication for initiating, new, and update)<\/li>\n<li>Automatic embed size trimming for Discord's 6000 character limit<\/li>\n<li>Built using native WordPress\/WooCommerce APIs<\/li>\n<li>Compatible with WooCommerce Custom Order Tables (HPOS)<\/li>\n<li>Subscription-aware titles when WooCommerce Subscriptions is active (New subscription, Subscription Renewal)<\/li>\n<li>Optional shipping method field (chosen freight and price) in the embed<\/li>\n<li>Drag-and-drop <strong>Embed field order<\/strong> \u2013 arrange Discord embed fields (including Order ID) in any order<\/li>\n<li>Optional <strong>New or returning customer<\/strong> field (matches prior orders by customer ID or billing email)<\/li>\n<\/ul>\n\n<h3>Requirements<\/h3>\n\n<ul>\n<li>WordPress 6.2 or higher (tested up to 6.9.4)<\/li>\n<li>WooCommerce 8.5 or higher (tested up to 10.6.1)<\/li>\n<li>PHP 8.0 or higher<\/li>\n<\/ul>\n\n<h3>Configuration<\/h3>\n\n<ol>\n<li><p><strong>Webhook URL<\/strong><br \/>\nEnter your Discord Webhook URL (from your Discord server settings).<\/p><\/li>\n<li><p><strong>Order Status Notifications<\/strong><br \/>\nChoose which order statuses should trigger notifications. You can also:<\/p>\n\n<ul>\n<li>Add different webhook URLs per status<\/li>\n<li>Choose unique embed colors<\/li>\n<\/ul><\/li>\n<li><p><strong>Embed Fields<\/strong><br \/>\nSelect which fields should appear in the Discord embed (status, payment info, items, custom product fields, order date, billing info, new\/returning customer, shipping method, transaction ID, order notes).<\/p><\/li>\n<li><p><strong>Embed field order<\/strong><br \/>\nDrag rows to set the order fields appear in Discord. Disabled Embed Fields are still skipped when sending.<\/p><\/li>\n<li><p><strong>Customer notes only<\/strong><br \/>\nWhen Order Notes is included, show only customer notes (exclude internal\/admin notes).<\/p><\/li>\n<li><p><strong>Disable Product Image<\/strong><br \/>\nToggle this to prevent the product image from appearing in the embed.<\/p><\/li>\n<li><p><strong>Send notification for Initiating payments<\/strong><br \/>\nWhen enabled, sends \"Initiating payment\" for pending orders, then \"New Order!\" when payment completes (processing).<\/p><\/li>\n<\/ol>\n\n<h3>Duplicate Protection<\/h3>\n\n<p>To prevent duplicate Discord messages (for example, if the thank-you page is refreshed), the plugin stores sent-event metadata on each order (<code>_discord_sent_*<\/code>). Initiating, new, and update notifications all use 120-second time-based deduplication. Before sending, the plugin checks whether that event was already sent within the last 120 seconds and skips if so. This ensures each notification is only sent <strong>once per order event<\/strong>.<\/p>\n\n<h3>Usage<\/h3>\n\n<ol>\n<li>After installing and activating the plugin, go to <strong>WooCommerce \u2192 Discord Notifications<\/strong>.<\/li>\n<li>Paste your Discord Webhook URL and select which statuses should send notifications.<\/li>\n<li>Choose which fields to include, drag to set embed field order, whether to show product images, and whether to limit order notes to customer notes only.<\/li>\n<li>Save your settings.<\/li>\n<\/ol>\n\n<h3>Author<\/h3>\n\n<p><a href=\"https:\/\/github.com\/Cral-Cactus\">Cral_Cactus<\/a><\/p>\n\n<h3>Support<\/h3>\n\n<p>Found a bug or have a suggestion? Open an issue on the GitHub repo: <a href=\"https:\/\/github.com\/Cral-Cactus\/wc-sale-discord-notifications\/issues\">https:\/\/github.com\/Cral-Cactus\/wc-sale-discord-notifications\/issues<\/a><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download this plugin or clone the repo into <code>\/wp-content\/plugins\/wc-sale-discord-notifications<\/code>.<\/li>\n<li>Activate the plugin via <strong>Plugins \u2192 Installed Plugins<\/strong>.<\/li>\n<li>Go to <strong>WooCommerce \u2192 Discord Notifications<\/strong>.<\/li>\n<li>Configure your settings.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>3.2.0<\/h4>\n\n<ul>\n<li>Optional embed field: shipping method (chosen freight) with tax-inclusive price per shipping line<\/li>\n<li><strong>Embed field order<\/strong> \u2013 drag-and-drop list in settings to arrange Discord embed fields (filter: <code>wc_sale_discord_field_order<\/code>)<\/li>\n<li>Each embed field carries a stable <code>internal_id<\/code> for size trimming with translated titles<\/li>\n<li>Optional embed field <strong>New or returning customer<\/strong> (based on prior orders with completed\/processing\/on-hold status, excluding the current order). Filters: <code>wc_sale_discord_returning_customer_order_statuses<\/code>, <code>wc_sale_discord_customer_type_label<\/code><\/li>\n<\/ul>\n\n<h4>3.1.2<\/h4>\n\n<ul>\n<li>Subscription-aware embed titles when WooCommerce Subscriptions is active (New subscription, Subscription Renewal)<\/li>\n<li>HTML entity decoding for price display so currency symbols render correctly in Discord (e.g. kr, \u20ac, \u00a3)<\/li>\n<li>Filter <code>wc_sale_discord_embed_title<\/code> for customizing embed titles<\/li>\n<\/ul>\n\n<h4>3.1.1<\/h4>\n\n<ul>\n<li>Customer notes only toggle \u2013 exclude internal\/admin notes when Order Notes is included<\/li>\n<li>Automatic embed size trimming to fit Discord's 6000 character limit<\/li>\n<li>UTF-8 safe truncation for field values (mb_substr when available)<\/li>\n<li>Webhook error logging via WooCommerce logger<\/li>\n<li>Prefer WC_Order::get_customer_order_notes() when available (WC 9.2+)<\/li>\n<li>Code quality: docblocks, type hints, removed redundant logic<\/li>\n<\/ul>\n\n<h4>3.1<\/h4>\n\n<ul>\n<li>Implemented notification for Initiating Payment (when order is placed with pending status, before payment completes)<\/li>\n<li>Implemented embedded fields for Order Notes<\/li>\n<li>When Initiating Payments is enabled: sends \"Initiating payment\" for pending orders, then \"New Order!\" when payment completes (processing)<\/li>\n<\/ul>\n\n<h4>3.0<\/h4>\n\n<ul>\n<li>Updated plugin logo.<\/li>\n<\/ul>\n\n<h4>2.3<\/h4>\n\n<ul>\n<li>Added support for custom product fields in Discord notifications.<\/li>\n<li>New \"Custom Fields\" toggle in settings\u2014when enabled, product-level custom fields (from add-ons\/APF) are included in order item details.<\/li>\n<\/ul>\n\n<h4>2.2<\/h4>\n\n<ul>\n<li>Implemented per-status duplicate protection using order meta instead of a global flag.<\/li>\n<li>Removed redundant duplicate-check logic and double log writes.<\/li>\n<li>Added sanitization callbacks for all plugin options to improve data safety.<\/li>\n<li>Made Discord webhook POST asynchronous (<code>blocking =&gt; false<\/code>) with basic error handling.<\/li>\n<li>Improved status change hook to only trigger on selected statuses.<\/li>\n<li>Enhanced embed field building with formatted totals, safe hex color handling, and image fallback.<\/li>\n<li>Updated \"Tested up to\" and \"WC tested up to\" versions.<\/li>\n<\/ul>\n\n<h4>2.1<\/h4>\n\n<ul>\n<li>Admin setting to choose what fields to include in Discord messages.<\/li>\n<li>Added protection against duplicate notifications using order meta.<\/li>\n<li>Per-status webhook URL support.<\/li>\n<li>Full compatibility with WooCommerce 8+ (custom order tables).<\/li>\n<\/ul>\n\n<h4>2.0<\/h4>\n\n<ul>\n<li>Added option to exclude product image from embeds.<\/li>\n<\/ul>\n\n<h4>1.9<\/h4>\n\n<ul>\n<li>Added notifications for changes in order status.<\/li>\n<\/ul>\n\n<h4>1.8 and below<\/h4>\n\n<ul>\n<li>Initial features and webhook sending.<\/li>\n<\/ul>","raw_excerpt":"A powerful WooCommerce extension that sends order updates directly to your Discord server.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/197883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=197883"}],"author":[{"embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cralcactus"}],"wp:attachment":[{"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=197883"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=197883"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=197883"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=197883"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=197883"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=197883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}