Making WordPress.org


Ignore:
Timestamp:
04/19/2024 02:17:14 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Review: Add the New ZIP uploaded HelpScout notice as a reply rather than as a note.

This causes the threads 'Waiting Since' to reset to the ZIP upload time, and for plugin authors to get a confirmation email that the upload has succeeded.

Fixes #7597.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php

    r13526 r13574  
    772772                );
    773773
     774                $name = wp_get_current_user()->display_name ?: wp_get_current_user()->user_login;
     775                $payload = [
     776                        'customer' => [
     777                                'firstName' => explode( ' ', $name, 2 )[0],
     778                                'lastName'  => trim( explode( ' ', "{$name} ", 2 )[1] ),
     779                                'email'     => wp_get_current_user()->user_email,
     780                        ],
     781                        'text'   => $text,
     782                        'status' => 'active',
     783                ];
     784
    774785                $result = HelpScout::api(
    775                         '/v2/conversations/' . $review_email->id . '/notes',
    776                         [
    777                                 'text'   => $text,
    778                                 'status' => 'active',
    779                         ],
     786                        '/v2/conversations/' . $review_email->id . '/reply',
     787                        $payload,
    780788                        'POST',
    781789                        $http_response_code
Note: See TracChangeset for help on using the changeset viewer.