diff --git a/plugins/woocommerce-admin/changelogs/update-7915 b/plugins/woocommerce-admin/changelogs/update-7915 new file mode 100644 index 00000000000..ec4a52d89c1 --- /dev/null +++ b/plugins/woocommerce-admin/changelogs/update-7915 @@ -0,0 +1,4 @@ +Significance: minor +Type: Update + +Allow content data note props to be passed from remote sources #8047 diff --git a/plugins/woocommerce-admin/src/RemoteInboxNotifications/SpecRunner.php b/plugins/woocommerce-admin/src/RemoteInboxNotifications/SpecRunner.php index 898feaff7ba..02104c3f414 100644 --- a/plugins/woocommerce-admin/src/RemoteInboxNotifications/SpecRunner.php +++ b/plugins/woocommerce-admin/src/RemoteInboxNotifications/SpecRunner.php @@ -59,7 +59,7 @@ class SpecRunner { // Set up the note. $note->set_title( $locale->title ); $note->set_content( $locale->content ); - $note->set_content_data( (object) array() ); + $note->set_content_data( isset( $spec->content_data ) ? $spec->content_data : (object) array() ); $note->set_status( $status ); $note->set_type( $spec->type ); $note->set_name( $spec->slug );