Skip to content

Commit a7d1cfb

Browse files
inventory & mail fix
1 parent 243aa01 commit a7d1cfb

File tree

3 files changed

+20
-583
lines changed

3 files changed

+20
-583
lines changed

admin/class-paystack-forms-admin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ function kkd_pff_paystack_editor_add_email_data()
429429

430430
// Get the location data if its already been entered
431431
$subject = get_post_meta($post->ID, '_subject', true);
432+
$merchant = get_post_meta($post->ID, '_merchant', true);
432433
$heading = get_post_meta($post->ID, '_heading', true);
433434
$message = get_post_meta($post->ID, '_message', true);
434435
$sendreceipt = get_post_meta($post->ID, '_sendreceipt', true);
@@ -462,6 +463,8 @@ function kkd_pff_paystack_editor_add_email_data()
462463
</select>';
463464
echo '<p>Email Subject:</p>';
464465
echo '<input type="text" name="_subject" value="' . $subject . '" class="widefat" />';
466+
echo '<p>Merchant Name on Receipt:</p>';
467+
echo '<input type="text" name="_merchant" value="' . $merchant . '" class="widefat" />';
465468
echo '<p>Email Heading:</p>';
466469
echo '<input type="text" name="_heading" value="' . $heading . '" class="widefat" />';
467470
echo '<p>Email Body/Message:</p>';
@@ -708,9 +711,11 @@ function kkd_pff_paystack_save_data($post_id, $post)
708711
$form_meta['_redirect'] = $_POST['_redirect'];
709712
///
710713
$form_meta['_subject'] = $_POST['_subject'];
714+
$form_meta['_merchant'] = $_POST['_merchant'];
711715
$form_meta['_heading'] = $_POST['_heading'];
712716
$form_meta['_message'] = $_POST['_message'];
713717
$form_meta['_sendreceipt'] = $_POST['_sendreceipt'];
718+
$form_meta['_sendinvoice'] = $_POST['_sendinvoice'];
714719
///
715720
$form_meta['_recur'] = $_POST['_recur'];
716721
$form_meta['_recurplan'] = $_POST['_recurplan'];

public/class-paystack-forms-public-for-old-themes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ function kkd_pff_paystack_send_receipt($id, $currency, $amount, $name, $email, $
286286
// echo date('F j,Y');
287287
$user_email = stripslashes($email);
288288
$subject = get_post_meta($id, '_subject', true);
289+
$merchant = get_post_meta($id, '_merchant', true);
289290
$heading = get_post_meta($id, '_heading', true);
290291
$sitemessage = get_post_meta($id, '_message', true);
291292

@@ -332,6 +333,7 @@ function kkd_pff_paystack_send_receipt($id, $currency, $amount, $name, $email, $
332333
<tr>
333334
<td class="column_cell font_default" align="center" valign="top" style="padding:16px;font-family:Helvetica,Arial,sans-serif;font-size:15px;text-align:center;vertical-align:top;color:#888">
334335
<p style="font-family:Helvetica,Arial,sans-serif;font-size:15px;line-height:23px;margin-top:16px;margin-bottom:24px">&nbsp; </p>
336+
<h5 style="padding:3px 7px;font-family:Helvetica,Arial,sans-serif;font-size:10px;font-weight:bold;text-transform:uppercase;letter-spacing:2px;-webkit-border-radius:2px;border-radius:2px;white-space:nowrap;background-color:#666;color:#fff"><?php echo $merchant; ?></h5>
335337
<h5 style="font-family:Helvetica,Arial,sans-serif;margin-left:0;margin-right:0;margin-top:16px;margin-bottom:8px;padding:0;font-size:18px;line-height:26px;font-weight:bold;color:#383d42"><?php echo $heading; ?></h5>
336338
<p align="left" style="font-family:Helvetica,Arial,sans-serif;font-size:15px;line-height:23px;margin-top:16px;margin-bottom:24px">Hello <?php echo strstr($name." ", " ", true); ?>,</p>
337339
<p align="left" style="font-family:Helvetica,Arial,sans-serif;font-size:15px;line-height:23px;margin-top:16px;margin-bottom:24px"><?php echo $sitemessage; ?></p>

0 commit comments

Comments
 (0)