• Resolved Teemu Suoranta

    (@teemusuoranta)


    I had a export breaking bug in WP All Export. I traced the error in JS at wp-all-export/views/admin/export/process.php line 127: “start_date = moment().sod();”

    This gives me error in dev console “Uncaught TypeError: moment(…).sod is not a function”.

    Digging into moment.js documentation, I find that .sod() function is deprecated https://momentjs.com/docs/#/manipulating/start-of/

    The error can be fixed by changing the .sod() function to the new version as:
    “start_date = moment().startOf(‘day’);”

    Teemu

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Deprecated moment.js function moment().sod()’ is closed to new replies.