Discount not deducted from final price in WC order created by automate.io bot
-
Hi,
1. Situation: I created a bot on automate.io to create a WooCommerce order based on certain triggers. Included in the instructions for the bot is to apply certain discount vouchers. The discount vouchers have all been added on WC with their respective rules.
2. Summary of problem: the discount voucher(s) that the bot attaches to the WC order doesn’t get recognized by WC and the discount amount doesn’t get deducted from the cart total.
3. Description: I can see in the order that the coupon is attached to the order but the discount itself doesn’t get applied (deducted). If I remove the coupon and then apply the same coupon manually and update the order, then the discount gets deducted. So the coupon itself is OK. The discount code info does get sent to WooCommerce, but it has no effect on the order.
Here is a screenshot how the order looks after it is created by the bot: https://drive.google.com/open?id=1MDtt-LwZ6DlRToaS6TDCckBJVOy7nv6aAnd here is a screenshot how the order looks if I remove the discount coupon that the bot added and manually add the exact same discount coupon: https://drive.google.com/open?id=1MJt6giQnRGbEvDvhb41idoNYDEPhiofo
4. One more thing: When the order with the discount coupons gets created in WC, WC should also check the usage restrictions and limits of the coupon. Currently it appears that WC doesn’t check this, so the discount codes get applied to purchases even if the usage restrictions or limits would otherwise not allow the use of the coupon.
Anyone having a solution for this?
Many thanks in advance.Csaba
Status report:
### WordPress Environment ### WordPress address (URL): https://sonus-vn.com Site address (URL): https://sonus-vn.com WC Version: 3.6.2 Log Directory Writable: ? WP Version: 5.1.1 WP Multisite: – WP Memory Limit: 1 GB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.1.28 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.62.0 OpenSSL/1.0.2k SUHOSIN Installed: – MySQL Version: 5.6.43 Max Upload Size: 2 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? wp_remote_get() failed. Contact your hosting provider. ### Database ### WC Database Version: 3.6.2 WC Database Prefix: wp2_ MaxMind GeoIP Database: ? Total Database Size: 31.48MB Database Data Size: 29.88MB Database Index Size: 1.60MB wp2_woocommerce_sessions: Data: 0.07MB + Index: 0.00MB wp2_woocommerce_api_keys: Data: 0.00MB + Index: 0.01MB wp2_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_order_items: Data: 0.01MB + Index: 0.01MB wp2_woocommerce_order_itemmeta: Data: 0.05MB + Index: 0.04MB wp2_woocommerce_tax_rates: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB wp2_woocommerce_log: Data: 0.00MB + Index: 0.00MB wp2_ac_abandoned_cart_history_lite: Data: 0.04MB + Index: 0.00MB wp2_ac_email_templates_lite: Data: 0.03MB + Index: 0.00MB wp2_ac_guest_abandoned_cart_history_lite: Data: 0.00MB + Index: 0.00MB wp2_ac_sent_history_lite: Data: 0.00MB + Index: 0.00MB wp2_cb_licensing: Data: 0.02MB + Index: 0.00MB wp2_cf7dbplugin_st: Data: 0.01MB + Index: 0.01MB wp2_cf7dbplugin_submits: Data: 0.55MB + Index: 0.06MB wp2_commentmeta: Data: 0.00MB + Index: 0.00MB wp2_comments: Data: 0.03MB + Index: 0.03MB wp2_contact_bank: Data: 0.02MB + Index: 0.00MB wp2_contact_bank_meta: Data: 0.02MB + Index: 0.00MB wp2_failed_jobs: Data: 0.00MB + Index: 0.00MB wp2_huge_itslider_images: Data: 0.00MB + Index: 0.00MB wp2_huge_itslider_params: Data: 0.00MB + Index: 0.00MB wp2_huge_itslider_sliders: Data: 0.00MB + Index: 0.00MB wp2_itsec_distributed_storage: Data: 0.00MB + Index: 0.00MB wp2_itsec_fingerprints: Data: 0.00MB + Index: 0.00MB wp2_itsec_geolocation_cache: Data: 0.00MB + Index: 0.00MB wp2_itsec_lockouts: Data: 0.20MB + Index: 0.21MB wp2_itsec_logs: Data: 4.42MB + Index: 0.17MB wp2_itsec_temp: Data: 0.39MB + Index: 0.46MB wp2_links: Data: 0.00MB + Index: 0.00MB wp2_mailchimp_carts: Data: 0.00MB + Index: 0.00MB wp2_options: Data: 1.03MB + Index: 0.06MB wp2_postmeta: Data: 22.39MB + Index: 0.25MB wp2_posts: Data: 0.51MB + Index: 0.13MB wp2_queue: Data: 0.01MB + Index: 0.00MB wp2_termmeta: Data: 0.00MB + Index: 0.01MB wp2_terms: Data: 0.00MB + Index: 0.01MB wp2_term_relationships: Data: 0.04MB + Index: 0.09MB wp2_term_taxonomy: Data: 0.00MB + Index: 0.01MB wp2_usermeta: Data: 0.04MB + Index: 0.02MB wp2_users: Data: 0.00MB + Index: 0.01MB wp2_wc_download_log: Data: 0.00MB + Index: 0.00MB wp2_wc_product_meta_lookup: Data: 0.00MB + Index: 0.01MB wp2_wc_webhooks: Data: 0.00MB + Index: 0.00MB wp2_yoast_seo_links: Data: 0.00MB + Index: 0.00MB wp2_yoast_seo_meta: Data: 0.00MB + Index: 0.00MB ### Post Type Counts ### attachment: 330 custom_css: 1 customize_changeset: 65 nav_menu_item: 12 page: 28 popup: 1 post: 1 product: 6 revision: 497 scheduled-action: 56 shop_coupon: 7 shop_order: 95 tbuilder_layout_part: 1 testimonial: 28 wpcf7_contact_form: 10 ### Security ### Secure connection (HTTPS): ? Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ? ### Active Plugins (21) ### Akismet Anti-Spam: by Automattic – 4.1.1 iThemes Security: by iThemes – 7.3.3 Contact Bank: by Tech-Banker – 3.0.24 Contact Form DB: by Michael Simpson – 2.10.25 Contact Form 7: by Takayuki Miyoshi – 5.1.1 Easy WP SMTP: by wpecommerce alexanderfoxc – 1.3.9.1 Insert Headers and Footers: by WPBeginner – 1.4.3 Mailchimp for WooCommerce: by Mailchimp – 2.1.15 – Not tested with the active version of WooCommerce MailMunch - Grow Your Email List: by MailMunch – 3.1.1 Payoo.vn: by Duy.Thai – 1.0.0 – Not tested with the active version of WooCommerce Shortcode in Menus: by Gagan Deep Singh – 3.5 Fast Secure Contact Form: by fastsecure – 4.0.56 Themify Portfolio Post: by Themify – 1.0.8 Abandoned Cart Lite for WooCommerce: by Tyche Softwares – 5.3.4 WooCommerce Checkout Manager: by Visser Labs – 4.3 Google Ads for WooCommerce: by Kliken – 1.0.1 – Not tested with the active version of WooCommerce WooCommerce Products Visibility: by codemine – 3.2 – Not tested with the active version of WooCommerce WooCommerce Reminder Pro: by flippercode – 1.0.9 – Not tested with the active version of WooCommerce WooCommerce Simply Order Export: by Ankit Gade – 3.0.11 – Not tested with the active version of WooCommerce WooCommerce: by Automattic – 3.6.2 Yoast SEO: by Team Yoast – 11.1 – Not tested with the active version of WooCommerce ### Inactive Plugins (8) ### Checkout Field Editor for WooCommerce: by ThemeHiGH – 1.3.2 Coming Soon Page & Maintenance Mode by SeedProd: by SeedProd – 5.0.25 Custom Product Tabs for WooCommerce: by YIKES Inc. – 1.6.10 PopupAlly: by AccessAlly – 2.0.2 Product Visibility by User Role for WooCommerce: by WP Wham – 1.4.1 – Not tested with the active version of WooCommerce SpeakPipe - Voicemail for Websites: by SpeakPipe Team – 0.2 WC Duplicate Order: by Jamie Gill – 1.5 – Not tested with the active version of WooCommerce xili-language: by dev.xiligroup.com - MS – 2.21.2 ### Settings ### API Enabled: – Force SSL: – Currency: VND (?) Currency Position: right Thousand Separator: , Decimal Separator: . Number of Decimals: 0 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: ? ### WC Pages ### Shop base: #5596 - /shop/ Cart: #5597 - /cart/ Checkout: #5598 - /checkout/ My account: #5599 - /my-account/ Terms and conditions: #5614 - /terms-and-conditions/ ### Theme ### Name: Themify Fullpane Version: 1.8.0 Author URL: https://www.themify.me Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Overrides: – ### Action Scheduler ### Complete: 49 Oldest: 2019-04-18 03:36:13 +0000 Newest: 2019-05-03 04:55:30 +0000 Pending: 0 Oldest: – Newest: – Canceled: 7 Oldest: 2019-04-20 04:03:40 +0000 Newest: 2019-04-25 04:27:32 +0000 In-progress: 0 Oldest: – Newest: – Failed: 0 Oldest: – Newest: –
The page I need help with: [log in to see the link]
- The topic ‘Discount not deducted from final price in WC order created by automate.io bot’ is closed to new replies.