Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Activity Panel: Inbox: Avoid Notice on Updating a Note: Convert WC_DateTime to timestamps #787

Closed
wants to merge 1 commit into from

Conversation

allendav
Copy link
Contributor

@allendav allendav commented Nov 6, 2018

Fixes #786

I swear I already fixed this when I saw it during development, but apparently I didn't :)

Screenshots

Detailed test instructions:

  • WP_DEBUG true
  • Install and activate the second activity panel example
  • Make sure you do NOT see any notice in your PHP log, and that mysql shows the note content updating on refreshing any wp-admin page, e.g.
mysql> select * from wcz_woocommerce_admin_notes;
+---------+-------------------------+------+--------+--------------------------+----------------------------------+------+-------------------------+------------+-------------------------+---------------------+---------------+
| note_id | name                    | type | locale | title                    | content                          | icon | content_data            | status     | source                  | date_created        | date_reminder |
+---------+-------------------------+------+--------+--------------------------+----------------------------------+------+-------------------------+------------+-------------------------+---------------------+---------------+
|       2 | wapi-example-plugin-two | info | en_US  | Domain Renewal Coming Up | Your domain expires in 254 days. | info | {"expires_in_days":254} | unactioned | wapi-example-plugin-two | 2018-11-06 21:52:07 | NULL          |
+---------+-------------------------+------+--------+--------------------------+----------------------------------+------+-------------------------+------------+-------------------------+---------------------+---------------+
1 row in set (0.00 sec)

mysql> select * from wcz_woocommerce_admin_notes;
+---------+-------------------------+------+--------+--------------------------+----------------------------------+------+-------------------------+------------+-------------------------+---------------------+---------------+
| note_id | name                    | type | locale | title                    | content                          | icon | content_data            | status     | source                  | date_created        | date_reminder |
+---------+-------------------------+------+--------+--------------------------+----------------------------------+------+-------------------------+------------+-------------------------+---------------------+---------------+
|       2 | wapi-example-plugin-two | info | en_US  | Domain Renewal Coming Up | Your domain expires in 265 days. | info | {"expires_in_days":265} | unactioned | wapi-example-plugin-two | 2018-11-06 21:52:07 | NULL          |
+---------+-------------------------+------+--------+--------------------------+----------------------------------+------+-------------------------+------------+-------------------------+---------------------+---------------+
1 row in set (0.00 sec)

@allendav allendav self-assigned this Nov 6, 2018
@allendav allendav requested a review from a team November 6, 2018 21:56
@allendav
Copy link
Contributor Author

allendav commented Nov 7, 2018

Nevermind. I just noticed I already fixed this in add/admin-notices-wc-helper

@allendav allendav closed this Nov 7, 2018
@allendav allendav deleted the fix/786-prepare-notice-on-updating-note branch November 7, 2018 12:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Activity Panel: Inbox: wpdb::prepare was called incorrectly (on updating a note)
1 participant