ClassicPress / classic-commerce

A simple but powerful e-commerce platform built for ClassicPress. Forked from WooCommerce and compatible with many Woo extensions.
https://classiccommerce.cc/
GNU General Public License v3.0
52 stars 15 forks source link

After deleting an order item the product is not restocked #338

Closed magenta-cuda closed 3 years ago

magenta-cuda commented 3 years ago

Describe the bug After an order item is deleted using the "Edit order" page the corresponding product is not restocked.

To Reproduce Steps to reproduce the behavior:

  1. Place an order for a simple product with stock management enabled and pay by check.
  2. Using the "Edit order" page delete the order item - click on the x.

Expected behavior The product should be restocked.

Isolating the problem (mark completed items with an [x]):

ClassicPress Environment

CMS Environment

Home URL: http://localhost Site URL: http://localhost CC Version: 1.0.3 WC Version: 3.5.3 Log Directory Writable: ✔ CMS Version: ✔ You are running ClassicPress Version 1.3.0 Multisite: – Memory Limit: 256 MB Debug Mode: – Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: Apache/2.4.38 (Debian) PHP Version: 7.3.29-1~deb10u1 PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: SUHOSIN Installed: – MySQL Version: 5.5.5-10.3.29-MariaDB-0+deb10u1 Max Upload Size: 2 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ❌ Your server does not have the DOMDocument class enabled - HTML/Multipart emails and also some extensions will not work without DOMDocument.

GZip: ✔ Multibyte String: ❌ Your server does not support the mbstring functions - this is required for better character encoding. Some fallbacks will be used instead for it. Remote Post: ✔ Remote Get: ✔

Database

CC Database Version: 3.5.3 WC Database Prefix: cp_ MaxMind GeoIP Database: ❌ The MaxMind GeoIP Database does not exist - Geolocation will not function. You can download and install it manually from https://dev.maxmind.com/geoip/geoip2/geolite2/ to the path: . Scroll down to "Downloads" and download the "MaxMind DB binary gzipped" file next to "GeoLite2 Country". Please remember to uncompress GeoLite2-Country_xxxxxxxx.tar.gz and upload the GeoLite2-Country.mmdb file only.

Total Database Size: 1.54MB Database Data Size: 0.69MB Database Index Size: 0.85MB cp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB cp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB cp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB cp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB cp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB cp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB cp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB cp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB cp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB cp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB cp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB cp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB cp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB cp_woocommerce_log: Data: 0.02MB + Index: 0.02MB cp_commentmeta: Data: 0.02MB + Index: 0.03MB cp_comments: Data: 0.02MB + Index: 0.09MB cp_links: Data: 0.02MB + Index: 0.02MB cp_options: Data: 0.11MB + Index: 0.02MB cp_postmeta: Data: 0.02MB + Index: 0.03MB cp_posts: Data: 0.06MB + Index: 0.06MB cp_termmeta: Data: 0.02MB + Index: 0.03MB cp_terms: Data: 0.02MB + Index: 0.03MB cp_term_relationships: Data: 0.02MB + Index: 0.02MB cp_term_taxonomy: Data: 0.02MB + Index: 0.03MB cp_usermeta: Data: 0.02MB + Index: 0.03MB cp_users: Data: 0.02MB + Index: 0.05MB cp_wc_download_log: Data: 0.02MB + Index: 0.03MB cp_wc_webhooks: Data: 0.02MB + Index: 0.02MB

Post Type Counts

attachment: 5 page: 7 post: 2 product: 2 revision: 2 shop_order: 1

Security

Secure connection (HTTPS): ❌ Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ✔

Active Plugins (1)

Classic Commerce: by ClassicPress Research Team – 1.0.4

Settings

API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 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)

WC Pages

Shop base: #5 - /shop/ Cart: #6 - /cart/ Checkout: #7 - /checkout/ My account: #8 - /my-account/ Terms and conditions: ❌ Page not set

Theme

Name: Storefront Version: 3.8.1 Author URL: https://woocommerce.com/ Child Theme: ❌ – If you are modifying Classic Commerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme Classic Commerce Support: ✔

Templates

Overrides: –

The solution to this bug can be found in issue 337 https://github.com/ClassicPress-plugins/classic-commerce/issues/337

As an alternative to deleting the order item the store owner may want to consider clicking the refund button and doing a total refund on the order item instead.