• Resolved MisterR

    (@mister_r)


    Hi,

    recently added code in \includes\class-wc-form-handler.php, which forbids to add another payment method in less than X seconds, is not showing the amount of seconds.

    So instead of seeing

    ‘You cannot add a new payment method so soon after the previous one. Please wait for 20 seconds.’ (20 is your default delay time)

    we get

    ‘You cannot add a new payment method so soon after the previous one. Please wait for %d seconds.’

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Riaan K.

    (@riaanknoetze)

    Hi there,

    It sounds like you’re looking for a review on the code you’ve written rather than with the default functionality of the WooCommerce plugin. If that’s accurate, we’d recommend getting in touch with the web developer community at large to review the code.

    If you’re wondering, the developers over at http://stackexchange.com/ are super helpful in my experience πŸ™‚

    Thread Starter MisterR

    (@mister_r)

    RK, no doubt that your experience is very helpful, but not in this case.

    I meant code in woocommerce\includes\class-wc-form-handler.php

    If to be precise, this part

    if ( WC_Rate_Limiter::retried_too_soon( $rate_limit_id ) ) {
    	wc_add_notice(
    		/* translators: %d number of seconds */
    		_n(
    			'You cannot add a new payment method so soon after the previous one. Please wait for %d second.',
    			'You cannot add a new payment method so soon after the previous one. Please wait for %d seconds.',
    			$delay,
    			'woocommerce'
    		),
    		'error'
    	);
    	return;
    }
    

    Hey @mister_r,

    Are you saying that when someone checking out triggers this message it is literally saying, “Please wait for %d seconds” instead of “Please wait for 20 seconds?”

    If so, does this happen with only WooCommerce, the payment gateway plugin and the Twenty Twenty theme active?

    If it does, then please let the developers know by creating a bug report at GitHub.

    https://github.com/woocommerce/woocommerce/issues/new/choose

    That way they’ll be aware of the issue and can address it.

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Add payment method delay notice’ is closed to new replies.