WordPress.org

Forums

WooCommerce - excelling eCommerce
[resolved] Warning: Invalid CRT parameters detected (9 posts)

  1. theonlinekiwi
    Member
    Posted 2 years ago #

    Great plugin! I've been using it without problems up until recently.

    I upgraded WordPress to 3.4 and everything worked fine, but for some reason the latest version of WooCommerce is giving me the following error when I try to place an order:

    Warning: Invalid CRT parameters detected in [local address]\wp-content\plugins\woocommerce\classes\class-wc-checkout.php on line 317

    {"result":"success","redirect":"http:\/\/localhost\/theonlinekiwi\/checkout\/order-received\/?order=764&key=order_4feae2259c7cd"}

    The first part is repeated 3 times.

    I'm at a complete loss. I've taken a copy of a backup from a while ago where everything works and simply upgrading WooCommerce causes this problem to arise.

    I've tried disabling all plugins, reinstalling things, nothing works. For the record, I'm using the 'MayaShop' theme from Themeforest (albeit modified). I don't have a live version of the site up at the moment as I don't want to lose any customers over this.

    Cheers,

    Andrew.

    http://wordpress.org/extend/plugins/woocommerce/

  2. theonlinekiwi
    Member
    Posted 2 years ago #

    To clarify.. in my development environment I am able to place an item in the cart and go to the final checkout screen. It's only when I try to place the order the problem pops up.

    It does it with both Bank Transfer and PayPal payment options, with the orders being somewhat processed (on hold in the back end).

  3. ZjanPreijde
    Member
    Posted 2 years ago #

    I have the same problem.
    The error is triggered in this line:
    'post_title' => sprintf( __( 'Order – %s', 'woocommerce' ), strftime( _x( '%B %e, %Y @ %I:%M %p', 'Order date parsed by strftime', 'woocommerce' ) ) ),
    while filling the array $order_data in line 317 of method WC_Checkout->process_checkout( ) which is called from woocommerce-ajax.php

    http://wordpress.org/extend/plugins/woocommerce/

  4. ZjanPreijde
    Member
    Posted 2 years ago #

    A change was apparantly made a week or so ago to make the order title translatable,
    the line :
    'post_title' => 'Order – '.date('F j, Y @ h:i A'),
    was changed into :
    'post_title' => sprintf( __( 'Order – %s', 'woocommerce' ), strftime( _x( '%B %e, %Y @ %I:%M %p', 'Order date parsed by strftime', 'woocommerce' ) ) ),
    but obviously that has not been thoroughly tested.

    If you really need it to work again soon, you could always change it back.

    Grtz, Zjan

    http://wordpress.org/extend/plugins/woocommerce/

  5. Geert De Deckere
    Member
    Posted 2 years ago #

    Okay, the problem is that Windows doesn't support all modifiers used here in the strftime() function:

    This means that %e, %T, %R and, %D (and possibly others) - as well as dates prior to Jan 1, 1970 - will not work on Windows, some Linux distributions, and a few other operating systems. — http://php.net/strftime

    Will have to update the default format then. If you provide a custom translation for that string you can fix the problem on your installation already without having to touch the plugin files.

  6. Mike Jolley
    Member
    Plugin Author

    Posted 2 years ago #

  7. MrPlow
    Member
    Posted 2 years ago #

    hi mikejolley

    I am also having the same problem.
    Is this a fix you posted? What is it that I need to do exactly to fix this?

    Thanks for your help!

  8. alucard001
    Member
    Posted 2 years ago #

    My fix is to go to woocommerce/classes/class-wc-checkout.php, change this line:

    sprintf( __( 'Order – %s', 'woocommerce' ), strftime( _x( '%B %e, %Y @ %I:%M %p', 'Order date parsed by strftime', 'woocommerce' ) ) ),

    to this:

    sprintf( __( 'Order – %s', 'woocommerce' ), strftime( _x( '%B %#d, %Y @ %I:%M %p', 'Order date parsed by strftime', 'woocommerce' ) ) ),

    i.e.: change from %e to %#d.

    Hope it helps.

  9. cghioureliotis
    Member
    Posted 2 years ago #

    I'm having the same problem. Checked the line mentioned, but no problems there. Any other ideas?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.