Changeset 2262712
- Timestamp:
- 03/17/2020 06:52:00 PM (6 years ago)
- Location:
- transact
- Files:
-
- 8 edited
- 7 copied
-
tags/4.1.1 (copied) (copied from transact/trunk)
-
tags/4.1.1/README.md (copied) (copied from transact/trunk/README.md)
-
tags/4.1.1/admin/controllers/transact-admin-settings-menu.php (copied) (copied from transact/trunk/admin/controllers/transact-admin-settings-menu.php)
-
tags/4.1.1/admin/controllers/transact-admin-settings-post.php (modified) (5 diffs)
-
tags/4.1.1/frontend/assets/transact_post.js (copied) (copied from transact/trunk/frontend/assets/transact_post.js) (1 diff)
-
tags/4.1.1/frontend/controllers/transact-handle-buttons.php (modified) (1 diff)
-
tags/4.1.1/frontend/controllers/transact-single-post.php (copied) (copied from transact/trunk/frontend/controllers/transact-single-post.php) (1 diff)
-
tags/4.1.1/readme.txt (copied) (copied from transact/trunk/readme.txt) (2 diffs)
-
tags/4.1.1/transact-plugin.php (copied) (copied from transact/trunk/transact-plugin.php) (1 diff)
-
trunk/admin/controllers/transact-admin-settings-post.php (modified) (5 diffs)
-
trunk/frontend/assets/transact_post.js (modified) (1 diff)
-
trunk/frontend/controllers/transact-handle-buttons.php (modified) (1 diff)
-
trunk/frontend/controllers/transact-single-post.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/transact-plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
transact/tags/4.1.1/admin/controllers/transact-admin-settings-post.php
r2246052 r2262712 149 149 if (isset($_POST['transact_donations'])) { 150 150 update_post_meta( $post_id, 'transact_donations', 1 ); 151 // Make sure to alwaus display the donation button 152 update_post_meta( $post_id, 'transact_display_button', self::PURCHASE_AND_SUBSCRIPTION); 151 153 } else { 152 154 update_post_meta( $post_id, 'transact_donations', 0 ); … … 297 299 298 300 <?php 299 $price_disabled = ($value[5] == 1 || $value[4] == self::ONLY_SUBSCRIBE || $value[4] == self::DISABLE) ? 'disabled' : ''; 301 $is_donation = $value[5] == 1; 302 $price_disabled = ($value[4] == self::ONLY_SUBSCRIBE || $value[4] == self::DISABLE) ? 'disabled' : ''; 300 303 ?> 301 304 … … 341 344 jQuery("#transact_display_button").attr('disabled', 'disabled'); 342 345 jQuery("#transact_redirect_after_donation").removeAttr('disabled'); 343 jQuery("#transact_price").attr('disabled', 'disabled'); 346 jQuery("#price_label__paid").css('display', 'none'); 347 jQuery("#price_label__donation").css('display', 'block'); 344 348 } else { 345 349 jQuery("#transact_display_button").removeAttr('disabled'); … … 349 353 jQuery("#transact_display_button").val() != <?php echo esc_attr(self::DISABLE); ?>) { 350 354 // Enable price box if the purchase type is not subscription only 351 jQuery("#transact_price").removeAttr('disabled'); 355 jQuery("#price_label__paid").css('display', 'block'); 356 jQuery("#price_label__donation").css('display', 'none'); 352 357 } 353 358 } … … 440 445 ?> 441 446 <div class="transact_meta_label"> 442 <label for="transact_price"><?php esc_html_e( 'Premium Price (cents)', 'transact' ); ?></label> 447 <label id="price_label__paid" style="<?php echo $is_donation ? esc_attr( 'display: none;', 'transact' ) : '' ?>" for="transact_price"> 448 <?php esc_html_e( 'Premium Price (cents)', 'transact' ); ?> 449 </label> 450 <label id="price_label__donation" style="<?php echo $is_donation ? '' : esc_attr( 'display: none;', 'transact' ) ?>" for="transact_price"> 451 <?php esc_html_e( 'Default Donation (cents)', 'transact' ); ?> 452 </label> 443 453 </div> 444 454 <div class="transact_meta_field"> -
transact/tags/4.1.1/frontend/assets/transact_post.js
r2256774 r2262712 41 41 42 42 if (transact_params.donation == 1) { 43 getDonationTokenAjaxCall(transact_params.price , nonce_value);43 getDonationTokenAjaxCall(transact_params.price || 1, nonce_value); 44 44 } else { 45 45 if(document.getElementById('button_purchase_single')) { -
transact/tags/4.1.1/frontend/controllers/transact-handle-buttons.php
r2245834 r2262712 99 99 $price = get_post_meta($this->post_id, 'transact_price', true ); 100 100 $button = $this->print_donate_button($this->options, $number_of_words); 101 $input = '<input type="number" name="donate" class="transact-donate_amount" id="donate_val" onchange="TransactWP.setDonateAmount()" value="'. $price.'"/>';101 $input = '<input type="number" name="donate" class="transact-donate_amount" id="donate_val" onchange="TransactWP.setDonateAmount()" value="'.($price ? $price : 1).'"/>'; 102 102 return $input . $button; 103 103 } -
transact/tags/4.1.1/frontend/controllers/transact-single-post.php
r2256774 r2262712 685 685 if (isset($options['account_valid']) && $options['account_valid'] && 686 686 get_post_meta( $this->post_id, 'transact_item_code', true ) && 687 get_post_meta( $this->post_id, 'transact_price', true ) &&688 687 ((is_single() && (get_post_type() === 'post') 689 688 || (in_array(get_post_type(), SettingsCpt::get_cpts_enable_for_transact(), true))) || -
transact/tags/4.1.1/readme.txt
r2256774 r2262712 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.3.2 8 Stable tag: 4.1. 08 Stable tag: 4.1.1 9 9 License: APACHE-2.0 10 10 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 81 81 == Changelog == 82 82 83 = 4.1.1 = 84 * Fix for donation pages. 85 83 86 = 4.1.0 = 84 87 * Google Tag manger integration -
transact/tags/4.1.1/transact-plugin.php
r2256774 r2262712 3 3 * Plugin Name: transact.io 4 4 * Description: Integrates transact.io services into WP 5 * Version: 4.1. 05 * Version: 4.1.1 6 6 * Author: transact.io 7 7 * Author URI: https://transact.io -
transact/trunk/admin/controllers/transact-admin-settings-post.php
r2246052 r2262712 149 149 if (isset($_POST['transact_donations'])) { 150 150 update_post_meta( $post_id, 'transact_donations', 1 ); 151 // Make sure to alwaus display the donation button 152 update_post_meta( $post_id, 'transact_display_button', self::PURCHASE_AND_SUBSCRIPTION); 151 153 } else { 152 154 update_post_meta( $post_id, 'transact_donations', 0 ); … … 297 299 298 300 <?php 299 $price_disabled = ($value[5] == 1 || $value[4] == self::ONLY_SUBSCRIBE || $value[4] == self::DISABLE) ? 'disabled' : ''; 301 $is_donation = $value[5] == 1; 302 $price_disabled = ($value[4] == self::ONLY_SUBSCRIBE || $value[4] == self::DISABLE) ? 'disabled' : ''; 300 303 ?> 301 304 … … 341 344 jQuery("#transact_display_button").attr('disabled', 'disabled'); 342 345 jQuery("#transact_redirect_after_donation").removeAttr('disabled'); 343 jQuery("#transact_price").attr('disabled', 'disabled'); 346 jQuery("#price_label__paid").css('display', 'none'); 347 jQuery("#price_label__donation").css('display', 'block'); 344 348 } else { 345 349 jQuery("#transact_display_button").removeAttr('disabled'); … … 349 353 jQuery("#transact_display_button").val() != <?php echo esc_attr(self::DISABLE); ?>) { 350 354 // Enable price box if the purchase type is not subscription only 351 jQuery("#transact_price").removeAttr('disabled'); 355 jQuery("#price_label__paid").css('display', 'block'); 356 jQuery("#price_label__donation").css('display', 'none'); 352 357 } 353 358 } … … 440 445 ?> 441 446 <div class="transact_meta_label"> 442 <label for="transact_price"><?php esc_html_e( 'Premium Price (cents)', 'transact' ); ?></label> 447 <label id="price_label__paid" style="<?php echo $is_donation ? esc_attr( 'display: none;', 'transact' ) : '' ?>" for="transact_price"> 448 <?php esc_html_e( 'Premium Price (cents)', 'transact' ); ?> 449 </label> 450 <label id="price_label__donation" style="<?php echo $is_donation ? '' : esc_attr( 'display: none;', 'transact' ) ?>" for="transact_price"> 451 <?php esc_html_e( 'Default Donation (cents)', 'transact' ); ?> 452 </label> 443 453 </div> 444 454 <div class="transact_meta_field"> -
transact/trunk/frontend/assets/transact_post.js
r2256774 r2262712 41 41 42 42 if (transact_params.donation == 1) { 43 getDonationTokenAjaxCall(transact_params.price , nonce_value);43 getDonationTokenAjaxCall(transact_params.price || 1, nonce_value); 44 44 } else { 45 45 if(document.getElementById('button_purchase_single')) { -
transact/trunk/frontend/controllers/transact-handle-buttons.php
r2245834 r2262712 99 99 $price = get_post_meta($this->post_id, 'transact_price', true ); 100 100 $button = $this->print_donate_button($this->options, $number_of_words); 101 $input = '<input type="number" name="donate" class="transact-donate_amount" id="donate_val" onchange="TransactWP.setDonateAmount()" value="'. $price.'"/>';101 $input = '<input type="number" name="donate" class="transact-donate_amount" id="donate_val" onchange="TransactWP.setDonateAmount()" value="'.($price ? $price : 1).'"/>'; 102 102 return $input . $button; 103 103 } -
transact/trunk/frontend/controllers/transact-single-post.php
r2256774 r2262712 685 685 if (isset($options['account_valid']) && $options['account_valid'] && 686 686 get_post_meta( $this->post_id, 'transact_item_code', true ) && 687 get_post_meta( $this->post_id, 'transact_price', true ) &&688 687 ((is_single() && (get_post_type() === 'post') 689 688 || (in_array(get_post_type(), SettingsCpt::get_cpts_enable_for_transact(), true))) || -
transact/trunk/readme.txt
r2256774 r2262712 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.3.2 8 Stable tag: 4.1. 08 Stable tag: 4.1.1 9 9 License: APACHE-2.0 10 10 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 81 81 == Changelog == 82 82 83 = 4.1.1 = 84 * Fix for donation pages. 85 83 86 = 4.1.0 = 84 87 * Google Tag manger integration -
transact/trunk/transact-plugin.php
r2256774 r2262712 3 3 * Plugin Name: transact.io 4 4 * Description: Integrates transact.io services into WP 5 * Version: 4.1. 05 * Version: 4.1.1 6 6 * Author: transact.io 7 7 * Author URI: https://transact.io
Note: See TracChangeset
for help on using the changeset viewer.