-
-
Save HeadStudios/3f03286f1672d271d7cb96fd3a8db6fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Single-Product Subscription Options Template. | |
* | |
* Override this template by copying it to 'yourtheme/woocommerce/single-product/product-subscription-options.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 2.1.0 | |
*/ | |
// Exit if accessed directly. | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
?> | |
<div class="wcsatt-options-wrapper" <?php echo count( $options ) === 1 ? 'style="display:none;"' : '' ?>><?php | |
if ( $prompt ) { | |
echo $prompt; | |
} else { | |
?><h3><?php | |
_e( 'Choose a subscription plan:', 'woocommerce-subscribe-all-the-things' ); | |
?></h3><?php | |
} | |
?><ul class="wcsatt-options-product"> | |
<select name="convert_to_sub_<?php echo absint( $product_id ); ?>"> | |
<?php | |
/*foreach ( $options as $option ) { | |
?><li class="<?php echo esc_attr( $option[ 'class' ] ); ?>"> | |
<label> | |
<input type="radio" name="convert_to_sub_<?php echo absint( $product_id ); ?>" data-custom_data="<?php echo esc_attr( json_encode( $option[ 'data' ] ) ); ?>" value="<?php echo esc_attr( $option[ 'value' ] ); ?>" <?php checked( $option[ 'selected' ], true, true ); ?> /> | |
<?php echo '<span class="' . esc_attr( $option[ 'class' ] ) . '-details">' . $option[ 'description' ] . '</span>'; ?> | |
</label> | |
</li><?php | |
}*/ | |
foreach ( $options as $option ) { | |
?> | |
<option value="<?php echo esc_attr( $option[ 'value' ] ); ?>" data-custom_data="<?php echo esc_attr( json_encode( $option[ 'data' ] ) ); ?>"><?php echo $option[ 'description' ]; ?></option> | |
<?php | |
} | |
?> | |
</select> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment