Skip to content

Commit c32dd37

Browse files
committed
rewrite for invoice.
1 parent 39b7b6d commit c32dd37

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

README.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ When you set the 'recur' option to 'optional' on the form settings, your donors/
2929

3030
This can come in handy for weekly/monthly offerings & tithes or recurring donor donations.
3131

32+
= For selling items =
33+
34+
To create a form to allow your users buy or pay for value in quantity.
35+
36+
* Set quantified to be 'yes'.
37+
* Set the max quantity a user can buy.
38+
3239
= Plugin Features =
3340

3441
* __Accept payment__ via MasterCard and Visa Cards.

includes/paystack-invoice.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
require_once('../../../../wp-load.php');
3+
get_header();
4+
5+
$code = @$_GET['code'];
6+
echo $code;
7+
?>
8+
9+
<div>
10+
11+
your custom php code goes here
12+
13+
</div>
14+
15+
<?php get_footer(); ?>

paystack-forms.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ function kkd_pff_paystack_invoice_url_rewrite(){
154154
global $wp_rewrite;
155155
$plugin_url = plugins_url( 'includes/paystack-invoice.php', __FILE__ );
156156
$plugin_url = substr( $plugin_url, strlen( home_url() ) + 1 );
157-
$wp_rewrite->non_wp_rules['paystackinvoice.php$'] = $plugin_url;
157+
$wp_rewrite->non_wp_rules['paystackinvoice$'] = $plugin_url;
158+
$wp_rewrite->non_wp_rules['paystackinvoice/$'] = $plugin_url;
158159
file_put_contents(ABSPATH.'.htaccess', $wp_rewrite->mod_rewrite_rules() );
159160
}

public/class-paystack-forms-public.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,8 +1184,8 @@ function kkd_pff_paystack_meta_as_custom_fields($metadata){
11841184
];
11851185
}elseif ($key == 'pf-quantity') {
11861186
$custom_fields[] = [
1187-
'display_name' => 'Plan Quantity',
1188-
'variable_name' => 'Plan Quantity',
1187+
'display_name' => 'Quantity',
1188+
'variable_name' => 'Quantity',
11891189
'type' => 'text',
11901190
'value' => $value
11911191
];

0 commit comments

Comments
 (0)