Skip to content

Commit eb44e80

Browse files
chore: use wc_get_template function
Update wcdp_form_style_2.php, wcdp_form_style_3.php, and 2 more files...
1 parent b5a568b commit eb44e80

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

includes/templates/styles/wcdp_form_style_2.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@
1212
?>
1313

1414
<div class="wcdp-body">
15-
<?php include(WCDP_DIR . 'includes/templates/wcdp_step_1.php'); ?>
15+
<?php wc_get_template('wcdp_step_1.php',
16+
array(
17+
'product_id'=> $product_id,
18+
'has_child' => $has_child,
19+
'product' => $product,
20+
'value' => $value,
21+
'context' => $context,
22+
), '', WCDP_DIR . 'includes/templates/'); ?>
1623
<?php do_action('woocommerce_before_checkout_form', $checkout); ?>
1724
<form name="checkout" method="post" class="checkout woocommerce-checkout"
1825
action="<?php echo esc_url(wc_get_checkout_url()); ?>" enctype="multipart/form-data">

includes/templates/styles/wcdp_form_style_3.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77
?>
88
<div class="wcdp-body">
99
<div class="wcdp-tab" id="wcdp-step-1">
10-
<?php include(WCDP_DIR . 'includes/templates/wcdp_step_1.php'); ?>
10+
<?php wc_get_template('wcdp_step_1.php',
11+
array(
12+
'product_id'=> $product_id,
13+
'has_child' => $has_child,
14+
'product' => $product,
15+
'value' => $value,
16+
'context' => $context,
17+
), '', WCDP_DIR . 'includes/templates/'); ?>
1118
</div>
1219
<?php /** @var TYPE_NAME $checkout */
1320
do_action('woocommerce_before_checkout_form', $checkout); ?>

includes/templates/styles/wcdp_form_style_4.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,12 @@
1010
?>
1111

1212
<div class="wcdp-body">
13-
<?php include(WCDP_DIR . 'includes/templates/wcdp_step_1.php'); ?>
13+
<?php wc_get_template('wcdp_step_1.php',
14+
array(
15+
'product_id'=> $product_id,
16+
'has_child' => $has_child,
17+
'product' => $product,
18+
'value' => $value,
19+
'context' => $context,
20+
), '', WCDP_DIR . 'includes/templates/'); ?>
1421
</div>

includes/templates/styles/wcdp_form_style_checkout.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@
1111
}
1212
?>
1313
<div class="wcdp-body">
14-
<?php include(WCDP_DIR . 'includes/templates/wcdp_step_1.php'); ?>
14+
<?php wc_get_template('wcdp_step_1.php',
15+
array(
16+
'product_id'=> $product_id,
17+
'has_child' => $has_child,
18+
'product' => $product,
19+
'value' => $value,
20+
'context' => $context,
21+
), '', WCDP_DIR . 'includes/templates/'); ?>
1522
<svg class="wcdp-divider-arrow" width="90%" height="100%" viewBox="0 0 113 4" version="1.1"
1623
xmlns="http://www.w3.org/2000/svg" xml:space="preserve"
1724
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="export" x="0"

0 commit comments

Comments
 (0)