Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'wp_footer', 'show_price' );
- function show_price() {
- ?>
- <script type="text/javascript">
- jQuery(function($) {
- $(document).on('click', '.choose-plan-button', function() {
- var price = $(this).closest('ul').find('.summary .price:visible .plan-price').text();
- if($('.price_custom_label').length)
- $('.price_custom_label').html(price);
- else{
- if( $('#psts-cc-table tbody').length ){
- $('#psts-cc-table tbody').prepend('<tr><td class="pypl_label" align="right">Price</td><td class="price_custom_label">'+ price +'</td></tr>');
- }
- else{
- $('#psts-cc-table').prepend('<tr><td class="pypl_label" align="right">Price</td><td class="price_custom_label">'+ price +'</td></tr>');
- }
- }
- });
- });
- </script>
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement