Support » Plugin: Import any XML or CSV File to WordPress » How set date and time stamp in a Custom Field during import

  • Resolved paulnl

    (@paulnl)


    Hi,
    I’d like to set the current date and time to a Custom Field when running an import via cron on a regular basis, so I can see when the last update succesfully ran. (I realize I can go to WP All Import every time and check the latest logs but that’s not what I want, I want to show the custom field in the product admin listing and check if the pricing was updated whilst doing other product updates).

    I read that I should use ” instead of single quote ‘, and I tried many PHP functions but none work so far. Could you let me know what I should do instead?
    Some variations I tried and the error I get:
    [print date(“d-m-Y H:i”)] : ERROR: Call to undefined function “print date”
    [echo date(“d-m-Y H:i”)] : ERROR: Call to undefined function “echo date”
    [print date (“d-m-Y H:i”)] : ERROR: Unexpected token OPEN, statement was expected.
    [print date = date(“d-m-Y H:i”)] : ERROR: Unexpected token OPEN, statement was expected.
    [date = date(“d-m-Y H:i”)] : ERROR: Unexpected token OPEN, statement was expected.
    [date = date(”d-m-Y H:i”)] : ERROR: Unexpected symbol ‘ – When using shortcodes/PHP functions, use double quotes “, not single quotes ‘

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How set date and time stamp in a Custom Field during import’ is closed to new replies.