[wp-trac] [WordPress Trac] #44151: Personal data exports - lower priority exporters should place their data after the higher priority ones

WordPress Trac noreply at wordpress.org
Fri May 18 16:55:40 UTC 2018


#44151: Personal data exports - lower priority exporters should place their data
after the higher priority ones
--------------------------+-----------------------------
 Reporter:  robobot3000   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Privacy       |    Version:  trunk
 Severity:  normal        |   Keywords:  gdpr
  Focuses:                |
--------------------------+-----------------------------
 When two exporters are registered that export the data for the same
 group_id and the same item_id the data from the lower priority exporter is
 placed higher in the resulting file than the higher priority one.

 For example, this code:
 {{{#!php
 function exporter_1( $email_address, $page = 1 ) {
         return array(
                 'data' => array(
                         'group_id'    => 'group-1',
                         'group_label' => __( 'Orders', 'woocommerce-
 services' ),
                         'item_id'     => 'item-1',
                         'data'        => array(
                                 array(
                                         'name'  => __( 'Exporter 1' ),
                                         'value' => 1234,
                                 ),
                         ),
                 );,
                 'done' => true,
         );
 }

 function exporter_2( $email_address, $page = 1 ) {
         return array(
                 'data' => array(
                         'group_id'    => 'group-1',
                         'group_label' => __( 'Orders', 'woocommerce-
 services' ),
                         'item_id'     => 'item-1',
                         'data'        => array(
                                 array(
                                         'name'  => __( 'Exporter 2' ),
                                         'value' => 4567,
                                 ),
                         ),
                 );,
                 'done' => true,
         );
 }

 add_filter( 'wp_privacy_personal_data_exporters', 'exporter_1', 5 );
 add_filter( 'wp_privacy_personal_data_exporters', 'exporter_2', 10 );
 }}}
 should result in a file where 'Exporter 1' appears before 'Exporter 2'
 (see the priority attribute passed to the add_filter call), but this isn't
 the case.

 CC @allendav @jeffstieler

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


More information about the wp-trac mailing list