You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a admin, I want to export donations and import them in a new site.
Details
The date of donation is sometimes wrong.
Steps to Reproduce
In WP settings > General, choose the format d/m/Y ( 27/10/2022 )
Export the donations
In another site, import the donations
Some donations have the today date, other are not visible because they are in the futur.
The donations in the future gives an 400 error in some new functions: Value 'future' is not part of the enum Give\Donations\ValueObjects\DonationStatus.
We cannot delete the donations in the future.
Raison
In import-functions.php, the date is defined by: $post_date = mysql2date( 'Y-m-d', $data['post_date'] );
However, the mysql2date() suppse that the imput format is m/d/Y if the separator is a slash.
So '10/11/2022' becomes '11/10/2022' in the future.
And '27/10/2022' is an unexisting date.
I suggest to use the format selected in WP settings, with get_option('date_format').
I worked around by changing the settings before export the donations.
The text was updated successfully, but these errors were encountered:
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.
User Story
As a admin, I want to export donations and import them in a new site.
Details
The date of donation is sometimes wrong.
Steps to Reproduce
Value 'future' is not part of the enum Give\Donations\ValueObjects\DonationStatus
.Raison
In import-functions.php, the date is defined by:
$post_date = mysql2date( 'Y-m-d', $data['post_date'] );
However, the mysql2date() suppse that the imput format is
m/d/Y
if the separator is a slash.So '10/11/2022' becomes '11/10/2022' in the future.
And '27/10/2022' is an unexisting date.
I suggest to use the format selected in WP settings, with
get_option('date_format')
.I worked around by changing the settings before export the donations.
The text was updated successfully, but these errors were encountered: