parent
38f9f05bf8
commit
2f70bc5a50
@ -0,0 +1,55 @@ |
||||
<?php |
||||
/** |
||||
* Product Subscription Options Radio Prompt Template. |
||||
* |
||||
* Override this template by copying it to 'yourtheme/woocommerce/single-product/product-subscription-options-prompt-radio.php'. |
||||
* |
||||
* On occasion, this template file may need to be updated and you (the theme developer) will need to copy the new files to your theme to maintain compatibility. |
||||
* We try to do this as little as possible, but it does happen. |
||||
* When this occurs the version of the template file will be bumped and the readme will list any important changes. |
||||
* |
||||
* @version 4.1.0 |
||||
*/ |
||||
|
||||
// Exit if accessed directly. |
||||
if ( ! defined( 'ABSPATH' ) ) { |
||||
exit; |
||||
} |
||||
global $product; |
||||
?> |
||||
|
||||
<style> |
||||
.amount { |
||||
color: #1A1A1A; |
||||
font-weight: 600; |
||||
} |
||||
</style> |
||||
|
||||
<ul class="wcsatt-options-prompt-radios"> |
||||
<li class="wcsatt-options-prompt-radio"> |
||||
<label class="wcsatt-options-prompt-label wcsatt-options-prompt-label-one-time"> |
||||
<input class="wcsatt-options-prompt-action-input" type="radio" name="subscribe-to-action-input" value="no" /> |
||||
<div class="wcsatt-options-prompt-action"> |
||||
One-time purchase for |
||||
<b class="woocommerce-Price-amount"> |
||||
<?php |
||||
$regular_price = $product->get_regular_price(); |
||||
$sale_price = $product->get_sale_price(); |
||||
|
||||
if ( $sale_price && $regular_price > $sale_price ) { |
||||
echo '<del>' . wc_price( $regular_price ) . '</del> <ins>' . wc_price( $sale_price ) . '</ins>'; |
||||
} else { |
||||
echo wc_price( $regular_price ); |
||||
} |
||||
?> |
||||
</b> |
||||
</div> |
||||
</label> |
||||
</li> |
||||
<li class="wcsatt-options-prompt-radio"> |
||||
<label class="wcsatt-options-prompt-label wcsatt-options-prompt-label-subscription"> |
||||
<input class="wcsatt-options-prompt-action-input" type="radio" name="subscribe-to-action-input" value="yes" /> |
||||
<span class="wcsatt-options-prompt-action"><?php echo wp_kses_post( $subscription_cta ); ?></span>
|
||||
</label> |
||||
</li> |
||||
</ul> |
Loading…
Reference in new issue