Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

use WordPressdotorg\MU_Plugins\Utilities\Export_CSV;

Expand Down Expand Up @@ -119,7 +119,27 @@ public static function validate( $noop ) {
$link = esc_url_raw( add_query_arg( 'page', 'wordcamp-budget', admin_url( 'admin.php' ) ) );

$content = "A budget approval request has been submitted for {$domain} by {$user->user_login}:\n\n{$link}\n\nYours, Mr. Budget Tool";
wp_mail( '[email protected]', 'Budget Approval Requested: ' . $domain, $content );
wp_mail( '[email protected]', 'Budget Approval Requested: ' . $domain, $content );
// Get event name for subject line
$event_title = '';
if ( ! empty( $event_id ) ) {
$event_title = get_the_title( $event_id );
}

// Fallback if title not found
if ( empty( $event_title ) ) {
$event_title = ucfirst( $domain ); // old behaviour
}
// Final subject line
$subject = sprintf(
'Budget Approval Requested: %s (%s)',
$event_title,
$domain
);

wp_mail( '[email protected]', $subject, $content );

wp_mail( '[email protected]', $subject, $content );

} elseif ( 'draft' === $budget['status'] && ! empty( $_POST['wcb-budget-request-review'] ) ) {
// Save draft and request review.
Expand Down
Loading