As a user, I want the Reports feature to support WordPress version 4.8+ so that I do not have to update WP core to install GiveWP.
Details
A sizable percentage of WP users are still running WP 4.8 and 4.9, and GiveWP should continue to fully support these users. Currently, all aspects of GiveWP work as expected on a 4.8 or 4.9 install, except for the Reports feature.
Current Behavior
When running GiveWP on WordPress 4.8 or 4.9, the Reports page is in not functional and produces the following error:
Fatal error: Uncaught Error: Call to undefined function Give\Views\Admin\Pages\wp_set_script_translations() in /Users/steward/Local Sites/localgive/app/public/wp-content/plugins/give/src/Views/Admin/Pages/Reports.php on line 65
( ! ) Error: Call to undefined function Give\Views\Admin\Pages\wp_set_script_translations() in /Users/steward/Local Sites/localgive/app/public/wp-content/plugins/give/src/Views/Admin/Pages/Reports.php on line 65
Call Stack
# Time Memory Function Location
1 0.0001 412152 {main}( ) .../edit.php:0
2 0.0001 413400 require_once( '/Users/steward/Local Sites/localgive/app/public/wp-admin/admin.php' ) .../edit.php:10
3 0.7694 4933344 require_once( '/Users/steward/Local Sites/localgive/app/public/wp-admin/admin-header.php' ) .../admin.php:216
4 0.7703 4941360 do_action( ) .../admin-header.php:97
5 0.7703 4941736 WP_Hook->do_action( ) .../plugin.php:453
6 0.7703 4941736 WP_Hook->apply_filters( ) .../class-wp-hook.php:310
7 0.7708 4945112 Give\Views\Admin\Pages\Reports->enqueue_scripts( ) .../class-wp-hook.php:286
Expected Behavior
GiveWP should fully support WP Core 4.8+. The Reports feature should function correctly, and display/function the same in all releases of WP 4.8+.
The Reports page should not produce any PHP errors.
Bug Type
[ ] This bug describes functionality that once worked as expected in version X.X.X.
[x] This bug describes functionality that never worked as expected.
[ ] I am not sure whether this functionality ever worked as expected.
Steps to Reproduce
on a local site, open the shell and wp core download --version="4.9.13" --force
Navigate to the reports page.
Possible Solution
Back-port in wp_set_script_translations for those running WordPress under 5.0.
Acceptance Criteria
[ ] Reports page does not produce PHP errors running WordPress core 4.8+
[ ] Reports feature is fully functional regardless of WP core version (4.8+)
[ ] JS localization is handled in a way that supports WP versions 4.8 and 4.9
Bug Report
User Story
As a user, I want the Reports feature to support WordPress version 4.8+ so that I do not have to update WP core to install GiveWP.
Details
A sizable percentage of WP users are still running WP 4.8 and 4.9, and GiveWP should continue to fully support these users. Currently, all aspects of GiveWP work as expected on a 4.8 or 4.9 install, except for the Reports feature.
Current Behavior
When running GiveWP on WordPress 4.8 or 4.9, the Reports page is in not functional and produces the following error:
Expected Behavior
GiveWP should fully support WP Core 4.8+. The Reports feature should function correctly, and display/function the same in all releases of WP 4.8+.
The Reports page should not produce any PHP errors.
Bug Type
Steps to Reproduce
Possible Solution
Back-port in wp_set_script_translations for those running WordPress under 5.0.
Acceptance Criteria