Skip to content

Commit 6adf695

Browse files
chore: use wc_get_template() function
Update wcdp_step_1.php and wcdp_step_1_amount.php
1 parent eb44e80 commit 6adf695

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

includes/templates/wcdp_step_1.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,14 @@
8383

8484
<?php
8585
//Donation Amount section
86-
include('wcdp_step_1_amount.php');
86+
wc_get_template('wcdp_step_1_amount.php',
87+
array(
88+
'min_donation_amount'=> $min_donation_amount,
89+
'max_donation_amount' => $max_donation_amount,
90+
'product_id' => $product_id,
91+
'product' => $product,
92+
'value' => $value,
93+
), '', WCDP_DIR . 'includes/templates/');
8794

8895
//Variation fields
8996
include('wcdp_step_1_variations.php');

includes/templates/wcdp_step_1_amount.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
/**
33
* WCDP Shortcode Form
44
* @var float $min_donation_amount
5+
* @var float $max_donation_amount
56
* @var int $product_id
7+
* @var WC_Product $product
8+
* @var array $value
69
*/
710
if (!defined('ABSPATH')) exit;
811

0 commit comments

Comments
 (0)