[wp-trac] [WordPress Trac] #48593: Fatal error: Class ‘WP_Privacy_Data_Export_Requests_List_Table’ not found in /wp-admin/includes/deprecated.php on line 1526 On WordPress 5.3

WordPress Trac noreply at wordpress.org
Wed Nov 13 07:33:36 UTC 2019


#48593: Fatal error: Class ‘WP_Privacy_Data_Export_Requests_List_Table’ not found
in /wp-admin/includes/deprecated.php on line 1526 On WordPress 5.3
----------------------------+-----------------------------
 Reporter:  mhshohel        |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  5.3
 Severity:  critical        |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 Class

 {{{#!php
 <?php
 WP_Privacy_Data_Export_Requests_Table
 }}}
 AND
 {{{#!php
 <?php
 WP_Privacy_Data_Removal_Requests_List_Table
 }}}

 Called for extend but it does not exist on the deprecated. Solution Below
 on the /wp-admin/includes/deprecated.php. Replace

 {{{#!php
 <?php
 class WP_Privacy_Data_Export_Requests_Table extends
 WP_Privacy_Data_Export_Requests_List_Table {
                 function __construct( $args ) {
                         _deprecated_function( __CLASS__, '5.3.0',
 'WP_Privacy_Data_Export_Requests_List_Table' );

                         if ( ! isset( $args['screen'] ) || $args['screen']
 === 'export_personal_data' ) {
                                 $args['screen'] = 'export-personal-data';
                         }

                         parent::__construct( $args );
                 }
         }
 }}}

 With

 {{{#!php
 <?php
 if (class_exists('WP_Privacy_Data_Export_Requests_Table')) {

         class WP_Privacy_Data_Export_Requests_Table extends
 WP_Privacy_Data_Export_Requests_List_Table {
                 function __construct( $args ) {
                         _deprecated_function( __CLASS__, '5.3.0',
 'WP_Privacy_Data_Export_Requests_List_Table' );

                         if ( ! isset( $args['screen'] ) || $args['screen']
 === 'export_personal_data' ) {
                                 $args['screen'] = 'export-personal-data';
                         }

                         parent::__construct( $args );
                 }
         }
 }
 }}}

 AND Replace
 {{{#!php
 <?php
 class WP_Privacy_Data_Removal_Requests_Table extends
 WP_Privacy_Data_Removal_Requests_List_Table {
                 function __construct( $args ) {
                         _deprecated_function( __CLASS__, '5.3.0',
 'WP_Privacy_Data_Removal_Requests_List_Table' );

                         if ( ! isset( $args['screen'] ) || $args['screen']
 === 'remove_personal_data' ) {
                                 $args['screen'] = 'erase-personal-data';
                         }

                         parent::__construct( $args );
                 }
         }
 }}}

 With

 {{{#!php
 <?php
 if (class_exists('WP_Privacy_Data_Removal_Requests_List_Table')) {

         class WP_Privacy_Data_Removal_Requests_Table extends
 WP_Privacy_Data_Removal_Requests_List_Table {
                 function __construct( $args ) {
                         _deprecated_function( __CLASS__, '5.3.0',
 'WP_Privacy_Data_Removal_Requests_List_Table' );

                         if ( ! isset( $args['screen'] ) || $args['screen']
 === 'remove_personal_data' ) {
                                 $args['screen'] = 'erase-personal-data';
                         }

                         parent::__construct( $args );
                 }
         }
 }
 }}}


 Or include the both class files to
 {{{
 wp-admin/includes/deprecated.php
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48593>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list