• Resolved cloter

    (@cloter)


    Thanks for all the work on this plugin, it’s awesome!

    I’m setting up a site to sell training plans for cycling (my code for the construction of the plans also works as a plugin). I’m using the Delivery Date plugin (plus some code) to setup the start day of the training program. I’d like to let the Admim of the site change a ‘delivery date’ of an order (actually a ‘start date’ for the training) to a date in the past. I tried modifying the plugin at various points with no success.

    Could anyone, please, give me a hint as to what statement(s) (a time() definition?) to change in order to allow dates in the past for the delivery datepicker (i.e.: the ‘meta box’ in the plugin code)?

    I’d appreciate this help very mych!

    • This topic was modified 1 year, 9 months ago by cloter.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author coderockz

    (@shoroar)

    Hello @cloter

    Sorry, this is not possible with our plugin.

    Thread Starter cloter

    (@cloter)

    I did some digging in the code and modified a couple of files to achieve what I needed. If anyone is interested, the new code can be accessed though the link below:
    https://github.com/cloter/delivery_date

    The files that I changed are listed below (all changes have a comment line “NEOORBIT START” and “NEOORBIT END” around the mods).
    – class-coderockz-woo-delivery-admin.php
    – coderockz-woo-delivery-admin.js
    – class-coderockz-woo-delivery-public.php
    – coderockz-woo-delivery-public.js

    One interesting complement to this mod is to put a ‘days chooser’ in the settings page, to allow the admin to set how far in the past to allow the dates (for the customer and for the admin). In my code the variables ($beginning_date_admin and $beginning_date_public) are hardcoded in the classes:
    – Coderockz_Woo_Delivery_Admin
    – Coderockz_Woo_Delivery_Public

    I hope it can be useful to other people.

    • This reply was modified 1 year, 9 months ago by cloter.
    Thread Starter cloter

    (@cloter)

    Update, 06/20/2023: The possibility to adjust the number of days in the past for delivery (per observation above) has been implemented in the settings page of the modified Delivery Date plugin. The modified plugin zip file has been updated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change ‘delivery date’ to a Past date by the Admin’ is closed to new replies.