Support » Plugin: WooCommerce Cancel Abandoned Order » Calculate only on Business Days

  • Resolved mihaichis

    (@mihaichis)


    Hello,

    Is it possible to change this plugin somehow to calculate only the business days (from monday to friday only)?

    For example, if I set the cancel days to 3, and someone order on friday, to calculate the days without saturday and sunday.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author RVOLA

    (@rvola)

    It’s a good idea, I’ll add some fields to set this!
    If I have enough time it will still develop this month
    https://github.com/rvola/woo-cancel-abandoned-order/issues/2

    Hi!

    I achieved this functionality by the following edit to class-cao.php:

    $old_date        = strtotime( 'today -' . $options['woocao_days'] . ' days' );
    

    to

    $old_date        = strtotime( 'today -' . $options['woocao_days'] . ' weekdays' );
    

    Would appreciate if you could add this function in the next release though. =]

    Thanks for this awesome plugin Rvola.

    Plugin Author RVOLA

    (@rvola)

    Hello !
    I am adding to work on the plugin with your request.
    However, I have a problem.

    The idea is to add a field that allows you to choose which day of the week the plugin should work.

    This modification would allow to stop cancellations during the weekend for example.

    But can you explain to me again why you want this functionality, that I can better integrate it.

    Thread Starter mihaichis

    (@mihaichis)

    Hello,

    The proforma has a legal expiration time of 3 business days for bank transfer payment option, that means you can pay for an order in 3 days, but the days that the bank is open. That’s why I need it to calculate only the working/business days from monday to friday. So if an order is made on Friday, it has to be cancelled only on Thursday/Wednesday, not on Sunday/Monday, because the payment can’t be made in weekends.

    Thanks in advance,
    Mihai

    Plugin Author RVOLA

    (@rvola)

    ok I understand better

    Plugin Author RVOLA

    (@rvola)

    It’s done on version 1.5.0.
    More explanations of how it works here: https://github.com/rvola/woo-cancel-abandoned-order/wiki/Change-the-calculation-date-for-orders

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Calculate only on Business Days’ is closed to new replies.