ElasticPress
ElasticPress copied to clipboard
Display last sync info in site health screen
Description of the Change
This PR adds the sync info in the site health screen
Closes #2856
Closes #
How to test the Change
Changelog Entry
Added - Display last sync info in site health screen
Credits
Props @oscarssanchez , @felipeelia
Checklist:
- [ ] I agree to follow this project's Code of Conduct.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my change.
- [ ] All new and existing tests pass.
@oscarssanchez did you test this if the last sync threw some errors? The following snippet will likely throw errors related to the field limits, if you need:
add_filter(
'ep_prepare_meta_data',
function( $post_meta, $post ) {
for ( $i = 0; $i < 100; $i++ ) {
$post_meta[ "test_meta_{$i}_title_{$post->ID}" ] = 'Lorem';
$post_meta[ "test_meta_{$i}_body_{$post->ID}" ] = 'Ipsum';
}
return $post_meta;
},
10,
2
);
@oscarssanchez did you test this if the last sync threw some errors? The following snippet will likely throw errors related to the field limits, if you need:
add_filter( 'ep_prepare_meta_data', function( $post_meta, $post ) { for ( $i = 0; $i < 100; $i++ ) { $post_meta[ "test_meta_{$i}_title_{$post->ID}" ] = 'Lorem'; $post_meta[ "test_meta_{$i}_body_{$post->ID}" ] = 'Ipsum'; } return $post_meta; }, 10, 2 );
Yes errors seem to be logged correctly as well.