• Hi,

    This afternoon I have sold 14 of the same product and have noticed that at least 3 of the purchases did not reduce the stock level. I have not experienced this problem before updating to 2.4.10 from 2.4.8 earlier today and am wondering if there might be a bug?

    This is an example of the order notes on the affected orders:

    IPN payment completed
    added on 12th November 2015 at 6:39 pm Delete note
    Order status changed from Pending Payment to Processing.
    added on 12th November 2015 at 6:39 pm Delete note
    IPN payment completed
    added on 12th November 2015 at 6:39 pm Delete note

    And this is an example of the order notes on an order that reduced stock correctly:

    Item #6203 stock reduced from 7 to 6.
    added on 12th November 2015 at 9:48 pm Delete note
    Order status changed from Pending Payment to Processing.
    added on 12th November 2015 at 9:48 pm Delete note
    IPN payment completed
    added on 12th November 2015 at 9:48 pm Delete note

    The product in question is a simple product and I have stock management enabled. I did have the option to only allow the product to be sold individually enabled, but have disabled it in case it is causing the problem. I have had 2 sales since then which have reduced the stock as expected.

    I am using the built-in Paypal method. I have quite a few plugins installed, but have added nothing new for some time.

    Kind regards,

    Rebecca

    https://www.ads-software.com/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Was it the same item (6203) in both orders? post your system status report here too please.

    Thread Starter RebeccaBlackman

    (@rebeccablackman)

    Hi Mike, thanks for the speedy reply.

    All the orders are for the same item, yes. Incidentally, I have now sold another 9 of this item and the problem has not appeared again, so I am inclined to think it is related to the option allowing a product to be sold individually which has been disabled since yesterday.

    Here is the system report, apologies for not including it before.

    ### WordPress Environment ###

    Home URL: https://www.undeadteds.com
    Site URL: https://www.undeadteds.com
    WC Version: 2.4.10
    Log Directory Writable: ? /home/teds/public_html/wp-content/uploads/wc-logs/
    WP Version: 4.3.1
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    Language: en_GB

    ### Server Environment ###

    Server Info: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 mod_fcgid/2.3.9
    PHP Version: 5.4.44
    PHP Post Max Size: 8 MB
    PHP Time Limit: 60
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.5.42
    Max Upload Size: 8 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ? Your server does not have the SOAP Client class enabled – some gateway plugins which use SOAP may not work as expected.
    DOMDocument: ?
    GZip: ?
    Remote Post: ?
    Remote Get: ?

    ### Database ###

    WC Database Version: 2.4.10
    :
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_termmeta: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?

    ### Active Plugins (21) ###

    404 to 301: by Joel James – 2.0.9
    Akismet: by Automattic – 3.1.5
    BBQ Pro: by Jeff Starr – 1.2
    Better WordPress Minify: by Khang Minh – 1.3.3
    Smart Currency Converter for Woocommerce: by Codehound – 4.4.1
    Formidable: by Strategy11 – 2.0.16
    T(-) Countdown: by twinpictures
    baden03 – 2.3.9

    WooCommerce Table Rate Shipping Plus: by mangohour – 1.8.1
    Packpin Woocommerce Shipment Tracking: by Packpin – 1.2.1
    Popup Maker: by Daniel Iser – 1.3.9
    Postman SMTP: by Jason Hendriks – 1.7.2
    Search By SKU – for Woocommerce: by Matthew Lawson – 0.6.1
    WooCommerce Create Customer on Order: by cxThemes – 1.16
    WooCommerce Customer Manager: by Ewout Fernhout – 1.2.3
    WooCommerce Email Customizer: by cxThemes – 2.31
    WooCommerce PDF Invoices & Packing Slips: by Ewout Fernhout – 1.5.24
    WooCommerce PDF Invoices & Packing Slips Professional: by Ewout Fernhout – 1.4.2
    WooCommerce: by WooThemes – 2.4.10
    WP Menu Cart Pro: by Jeremiah Prummer
    Ewout Fernhout – 2.5.7

    WP Overnight Sidekick: by Jeremiah Prummer – 1.0.1
    WP Stagecoach: by WP Stagecoach – 1.2

    ### Settings ###

    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2

    ### API ###

    API Enabled: ?
    API Version: 3.0.0

    ### WC Pages ###

    Shop Base: Page not set
    Basket: #434 – /cart/
    Checkout: #435 – /checkout/
    My Account: #436 – /my-account/

    ### Taxonomies ###

    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)

    ### Theme ###

    Name: Virtue – Premium Child
    Version: 1.0.0
    Author URL: https://www.kadencethemes.com/
    Child Theme: ?
    Parent Theme Name: Virtue – Premium
    Parent Theme Version: 3.3.5
    Parent Theme Author URL: https://www.kadencethemes.com/
    WooCommerce Support: ?

    ### Templates ###

    Overrides: virtue_premium/woocommerce/archive-product.php
    virtue_premium/woocommerce/content-product.php
    virtue_premium/woocommerce/content-product_cat.php
    virtue_premium/woocommerce/content-single-product.php
    virtue_premium/woocommerce/loop/add-to-cart.php
    virtue_premium/woocommerce/loop/loop-end.php
    virtue_premium/woocommerce/loop/loop-start.php
    virtue_premium/woocommerce/loop/price.php
    virtue_premium/woocommerce/loop/rating.php
    virtue_premium/woocommerce/loop/sale-flash.php
    virtue_premium/product-searchform.php
    virtue_premium/woocommerce/single-product/add-to-cart/external.php
    virtue_premium/woocommerce/single-product/add-to-cart/grouped.php
    virtue_premium/woocommerce/single-product/add-to-cart/simple.php
    virtue_premium/woocommerce/single-product/add-to-cart/variable.php
    virtue_premium/woocommerce/single-product/price.php
    virtue_premium/woocommerce/single-product/product-image.php
    virtue_premium/woocommerce/single-product/product-thumbnails.php
    virtue_premium/woocommerce/single-product/related.php
    virtue_premium/woocommerce/single-product/review.php
    virtue_premium/woocommerce/single-product/sale-flash.php
    virtue_premium/woocommerce/single-product/title.php
    virtue_premium/woocommerce/single-product/up-sells.php
    virtue_premium/woocommerce/single-product.php
    virtue_premium/woocommerce/taxonomy-product_cat.php
    virtue_premium/woocommerce/taxonomy-product_tag.php

    Kind regards,

    Rebecca

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I don’t see sold_individually even called during stock reduction. I think its more likely that something errored out before stock reduction could occur – since there is not even an order note in your case.

    Do you have access to server error logs? See if there is a log file in /wp-content/

    Then search in that for ‘fatal error’.

    Thread Starter RebeccaBlackman

    (@rebeccablackman)

    Hi Mike,

    There is no log file in /wp-content/

    I have access to cPanel logs if there is anything you would like me to look for there?

    Kind regards,

    Rebecca

    Plugin Contributor Mike Jolley

    (@mikejolley)

    May be error logs there too – you want the PHP error log.

    Thread Starter RebeccaBlackman

    (@rebeccablackman)

    Hi Mike,

    I have access to the Apache logs on the server. I checked for errors at the time of two of the affected purchases and found this!

    [Thu Nov 12 18:39:20 2015] [warn] [client 173.0.81.1] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
    [Thu Nov 12 18:39:20 2015] [error] [client 173.0.81.1] Premature end of script headers: index.php
    [Thu Nov 12 18:39:23 2015] [error] mod_fcgid: process /usr/local/cpanel/cgi-sys/php5(13720) exit(communication error), get unexpected signal 11

    Goes right over my head, but perhaps means something to you?

    Kind regards,

    Rebecca

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Is that the only log? Not sure thats the correct one. Looking for one with PHP errors in it, not apache.

    Thread Starter RebeccaBlackman

    (@rebeccablackman)

    Hi Mike,

    That’s the only one that seems to have any useful information in it I’m afraid. I’ve been through the cpanel error and access logs and they don’t have any events occurring at those times.

    I could ask my hosting company to have a look as they will be able to SSH into the server and look at things I can’t.

    Kind regards,

    Rebecca

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Ok; add these to your wp-config.php file:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'WP_DEBUG_LOG', true );

    That will log errors, but won’t display them.

    Then monitor stock and next time this occurs, look to the log. Should give you more information.

    Thread Starter RebeccaBlackman

    (@rebeccablackman)

    Hi Mike,

    OK, I will do that and see what happens.

    Many thanks for your help.

    Kind regards,

    Rebecca

    Thread Starter RebeccaBlackman

    (@rebeccablackman)

    Hi Mike,

    Sorry for hassling you with 2 issues today. I just wanted to let you know that this issue recurred yesterday – I sold one product 11 times and 2 of those times the stock didn’t reduce.

    I have the debug log enabled, but the only errors I have in the logs are ones generated by Postman SMTP (which the developer is aware of and should be unrelated) and occasional ones by the Packpin shipment plugin, but these are nowhere near the times the stock issues occurred.

    I’ve no idea what could be causing the issue and it’s very difficult to diagnose as it happens so infrequently – most of my products are single-stock items and I’ve never had this happen with any of those.

    Not really expecting any solutions at this point, but thought I’d update this thread in case you do have any further suggestions or if anyone else is experiencing the same issue.

    Kind regards,

    Rebecca

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I have the debug log enabled, but the only errors I have in the logs are ones generated by Postman SMTP (which the developer is aware of and should be unrelated) and occasional ones by the Packpin shipment plugin, but these are nowhere near the times the stock issues occurred.

    Were they fatal? Fatal errors stop *everything* from running. If you have a fatal error before stock reduction, it won’t happen.

    Thread Starter RebeccaBlackman

    (@rebeccablackman)

    Hi Mike,

    No, they’re not fatal, here are examples of both (these didn’t happen at the time of the stock anomalies, but are exactly the same) :

    [06-Jan-2016 13:54:37 UTC] PHP Notice:  Undefined offset: -9223372036854775808 in /home/teds/public_html/wp-content/plugins/postman-smtp/Postman/PostmanUtils.php on line 197
    
    [06-Jan-2016 13:54:37 UTC] PHP Notice:  Undefined property: stdClass::$post_name in /home/teds/public_html/wp-content/plugins/packpin-woocommerce-shipment-tracking/PackpinTracking_Front_Shortcode.php on line 152

    This isn’t worrying me too much as it happens so infrequently, just thought I’d mention that it’s still happening.

    Kind regards,

    Rebecca

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Ok, so whats different about the 2 which failed. Notes? Statuses? Payment methods?

    Thread Starter RebeccaBlackman

    (@rebeccablackman)

    Hi Mike,

    I only use Paypal. Order statuses are the same.

    The item ordered by all 11 customers was the same, however it was a variable product and the 2 that failed bought different variations. I added all the variations at the same time though, so find it odd that 2 of them would be different in any way (they are just colour and style variations).

    The order notes are slightly different. On the ones that failed to reduced stock, the IPN notice occurs twice and there is no stock reduction note:

    IPN payment completed
    added on 6th January 2016 at 1:16 am Delete note
    Order status changed from Pending Payment to Processing.
    added on 6th January 2016 at 1:16 am Delete note
    IPN payment completed
    added on 6th January 2016 at 1:16 am Delete note

    This is a transaction where the stock was reduced accordingly:

    Item #9565 variation #9718 stock reduced from 2 to 1.
    added on 6th January 2016 at 2:11 am Delete note
    Order status changed from Pending Payment to Processing.
    added on 6th January 2016 at 2:11 am Delete note
    IPN payment completed
    added on 6th January 2016 at 2:11 am Delete note

    I am just wondering if the way the customer pays through Paypal would make a difference? For instance, if they used a Paypal account vs using a credit card without logging in?

    Kind regards,

    Rebecca

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Stock intermittently not being reduced’ is closed to new replies.