Changeset 2907456
- Timestamp:
- 05/03/2023 11:40:06 AM (3 years ago)
- Location:
- deposits-partial-payments-for-woocommerce
- Files:
-
- 10 edited
- 1 copied
- tags/1.1.10 (copied) (copied from deposits-partial-payments-for-woocommerce/trunk)
- tags/1.1.10/includes/class-awcdp-backend.php (modified) (2 diffs)
- tags/1.1.10/includes/class-awcdp-front-end.php (modified) (4 diffs)
- tags/1.1.10/readme.txt (modified) (2 diffs)
- tags/1.1.10/start.php (modified) (2 diffs)
- tags/1.1.10/templates/order/awcdp-partial-payment-details.php (modified) (1 diff)
- trunk/includes/class-awcdp-backend.php (modified) (2 diffs)
- trunk/includes/class-awcdp-front-end.php (modified) (4 diffs)
- trunk/readme.txt (modified) (2 diffs)
- trunk/start.php (modified) (2 diffs)
- trunk/templates/order/awcdp-partial-payment-details.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
deposits-partial-payments-for-woocommerce/tags/1.1.10/includes/class-awcdp-backend.php
r2896440 r2907456 100 100 add_filter( "plugin_action_links_$plugin", array( $this, 'add_settings_link' ) ); 101 101 102 add_action('woocommerce_product_write_panel_tabs', array($this, 'awcdp_tab_panel_tabs')); 102 //add_action('woocommerce_product_write_panel_tabs', array($this, 'awcdp_tab_panel_tabs')); 103 add_filter( 'woocommerce_product_data_tabs', array($this, 'awcdp_custom_product_tab'), 10, 1 ); 103 104 add_action('woocommerce_product_data_panels', array($this, 'awcdp_tab_data_panels')); 104 105 … … 297 298 } 298 299 300 } 301 302 function awcdp_custom_product_tab($default_tabs){ 303 $default_tabs['awcdp_deposits'] = array( 304 'label' => __( 'Deposits', 'deposits-partial-payments-for-woocommerce' ), 305 'target' => 'awcdp_deposits_tab_data', 306 'priority' => 90, 307 'class' => array('awcdp_deposits_tab') 308 ); 309 return $default_tabs; 299 310 } 300 311 -
deposits-partial-payments-for-woocommerce/tags/1.1.10/includes/class-awcdp-front-end.php
r2896440 r2907456 207 207 } 208 208 209 function awcdp_shortcode_deposit_function(){ 210 return $this->awcdp_get_deposit_container(); 211 } 212 213 function awcdp_get_deposit_container(){ 209 function awcdp_shortcode_deposit_function($atts){ 210 extract(shortcode_atts(array( 211 'product_id' => '', 212 ), $atts)); 213 return $this->awcdp_get_deposit_container($product_id); 214 } 215 216 function awcdp_get_deposit_container($product_id){ 214 217 215 218 if (!apply_filters('awcdp_disable_deposit_condition', true)) { return; } … … 222 225 } 223 226 227 //global $product; 228 //echo $this->awcdp_deposits_form( $product->get_id() ); 229 230 if( $product_id != ''){ 231 $product_id = $product_id; 232 } else { 224 233 global $product; 225 echo $this->awcdp_deposits_form( $product->get_id() ); 234 $product_id = $product->get_id() ; 235 } 236 echo $this->awcdp_deposits_form( $product_id ); 226 237 227 238 } … … 462 473 } 463 474 464 $discountedPrice = apply_filters('wcpa_product_price', $product->get_price(), $product); 465 if( $discountedPrice ){ 475 $discountedPrice = apply_filters('wcpa_product_price', $product->get_price(), $product); 476 if( is_array($discountedPrice) ){ $discountedPrice = $discountedPrice['price']; } 477 if( $discountedPrice ){ 466 478 $cart_item_meta['awcdp_deposit']['awdp_price'] = $discountedPrice; 467 }479 } 468 480 } 469 481 … … 1801 1813 if ($order && $order->get_type() == AWCDP_POST_TYPE) { 1802 1814 remove_action('woocommerce_thankyou', 'woocommerce_order_details_table', 10); 1803 do_action('awcdp_deposits_thankyou', $order); 1815 if( apply_filters('awcdp_disable_orders_details_table', true) ){ 1816 do_action('awcdp_deposits_thankyou', $order); 1817 } 1804 1818 remove_action('woocommerce_order_details_after_order_table', 'woocommerce_order_again_button'); 1805 1819 } -
deposits-partial-payments-for-woocommerce/tags/1.1.10/readme.txt
r2896440 r2907456 7 7 Requires at least: 4.0 8 8 Tested up to: 6.2 9 Stable tag: 1.1. 99 Stable tag: 1.1.10 10 10 11 11 WooCommerce Deposits and Partial Payments Plugin helps customers to make payments for the products they buy using a partial payment or a deposit. … … 123 123 124 124 == Changelog == 125 = 1.1.10 = 126 * Deposit shortcode update 125 127 = 1.1.9 = 126 128 * Support for WordPress 6.2 -
deposits-partial-payments-for-woocommerce/tags/1.1.10/start.php
r2896440 r2907456 2 2 /* 3 3 * Plugin Name: Deposits & Partial Payments for WooCommerce 4 * Version: 1.1. 94 * Version: 1.1.10 5 5 * Description: WooCommerce deposits allows customers to pay for products using a fixed or percentage amount in WooCommerce store 6 6 * Author: Acowebs … … 10 10 * Text Domain: deposits-partial-payments-for-woocommerce 11 11 * WC requires at least: 4.0.0 12 * WC tested up to: 7. 512 * WC tested up to: 7.6 13 13 */ 14 14 15 15 define('AWCDP_TOKEN', 'awcdp'); 16 define('AWCDP_VERSION', '1.1. 9');16 define('AWCDP_VERSION', '1.1.10'); 17 17 define('AWCDP_FILE', __FILE__); 18 18 define('AWCDP_PLUGIN_NAME', 'Deposits & Partial Payments for WooCommerce'); -
deposits-partial-payments-for-woocommerce/tags/1.1.10/templates/order/awcdp-partial-payment-details.php
r2785094 r2907456 15 15 ?> 16 16 17 <p ><?php esc_html_e('Partial payment details', 'deposits-partial-payments-for-woocommerce') ?></p>17 <p class="awcdp_deposits_summary_title"><?php esc_html_e('Partial payment details', 'deposits-partial-payments-for-woocommerce') ?></p> 18 18 <table class="woocommerce-table awcdp_deposits_summary"> 19 19 <thead> -
deposits-partial-payments-for-woocommerce/trunk/includes/class-awcdp-backend.php
r2896440 r2907456 100 100 add_filter( "plugin_action_links_$plugin", array( $this, 'add_settings_link' ) ); 101 101 102 add_action('woocommerce_product_write_panel_tabs', array($this, 'awcdp_tab_panel_tabs')); 102 //add_action('woocommerce_product_write_panel_tabs', array($this, 'awcdp_tab_panel_tabs')); 103 add_filter( 'woocommerce_product_data_tabs', array($this, 'awcdp_custom_product_tab'), 10, 1 ); 103 104 add_action('woocommerce_product_data_panels', array($this, 'awcdp_tab_data_panels')); 104 105 … … 297 298 } 298 299 300 } 301 302 function awcdp_custom_product_tab($default_tabs){ 303 $default_tabs['awcdp_deposits'] = array( 304 'label' => __( 'Deposits', 'deposits-partial-payments-for-woocommerce' ), 305 'target' => 'awcdp_deposits_tab_data', 306 'priority' => 90, 307 'class' => array('awcdp_deposits_tab') 308 ); 309 return $default_tabs; 299 310 } 300 311 -
deposits-partial-payments-for-woocommerce/trunk/includes/class-awcdp-front-end.php
r2896440 r2907456 207 207 } 208 208 209 function awcdp_shortcode_deposit_function(){ 210 return $this->awcdp_get_deposit_container(); 211 } 212 213 function awcdp_get_deposit_container(){ 209 function awcdp_shortcode_deposit_function($atts){ 210 extract(shortcode_atts(array( 211 'product_id' => '', 212 ), $atts)); 213 return $this->awcdp_get_deposit_container($product_id); 214 } 215 216 function awcdp_get_deposit_container($product_id){ 214 217 215 218 if (!apply_filters('awcdp_disable_deposit_condition', true)) { return; } … … 222 225 } 223 226 227 //global $product; 228 //echo $this->awcdp_deposits_form( $product->get_id() ); 229 230 if( $product_id != ''){ 231 $product_id = $product_id; 232 } else { 224 233 global $product; 225 echo $this->awcdp_deposits_form( $product->get_id() ); 234 $product_id = $product->get_id() ; 235 } 236 echo $this->awcdp_deposits_form( $product_id ); 226 237 227 238 } … … 462 473 } 463 474 464 $discountedPrice = apply_filters('wcpa_product_price', $product->get_price(), $product); 465 if( $discountedPrice ){ 475 $discountedPrice = apply_filters('wcpa_product_price', $product->get_price(), $product); 476 if( is_array($discountedPrice) ){ $discountedPrice = $discountedPrice['price']; } 477 if( $discountedPrice ){ 466 478 $cart_item_meta['awcdp_deposit']['awdp_price'] = $discountedPrice; 467 }479 } 468 480 } 469 481 … … 1801 1813 if ($order && $order->get_type() == AWCDP_POST_TYPE) { 1802 1814 remove_action('woocommerce_thankyou', 'woocommerce_order_details_table', 10); 1803 do_action('awcdp_deposits_thankyou', $order); 1815 if( apply_filters('awcdp_disable_orders_details_table', true) ){ 1816 do_action('awcdp_deposits_thankyou', $order); 1817 } 1804 1818 remove_action('woocommerce_order_details_after_order_table', 'woocommerce_order_again_button'); 1805 1819 } -
deposits-partial-payments-for-woocommerce/trunk/readme.txt
r2896440 r2907456 7 7 Requires at least: 4.0 8 8 Tested up to: 6.2 9 Stable tag: 1.1. 99 Stable tag: 1.1.10 10 10 11 11 WooCommerce Deposits and Partial Payments Plugin helps customers to make payments for the products they buy using a partial payment or a deposit. … … 123 123 124 124 == Changelog == 125 = 1.1.10 = 126 * Deposit shortcode update 125 127 = 1.1.9 = 126 128 * Support for WordPress 6.2 -
deposits-partial-payments-for-woocommerce/trunk/start.php
r2896440 r2907456 2 2 /* 3 3 * Plugin Name: Deposits & Partial Payments for WooCommerce 4 * Version: 1.1. 94 * Version: 1.1.10 5 5 * Description: WooCommerce deposits allows customers to pay for products using a fixed or percentage amount in WooCommerce store 6 6 * Author: Acowebs … … 10 10 * Text Domain: deposits-partial-payments-for-woocommerce 11 11 * WC requires at least: 4.0.0 12 * WC tested up to: 7. 512 * WC tested up to: 7.6 13 13 */ 14 14 15 15 define('AWCDP_TOKEN', 'awcdp'); 16 define('AWCDP_VERSION', '1.1. 9');16 define('AWCDP_VERSION', '1.1.10'); 17 17 define('AWCDP_FILE', __FILE__); 18 18 define('AWCDP_PLUGIN_NAME', 'Deposits & Partial Payments for WooCommerce'); -
deposits-partial-payments-for-woocommerce/trunk/templates/order/awcdp-partial-payment-details.php
r2785094 r2907456 15 15 ?> 16 16 17 <p ><?php esc_html_e('Partial payment details', 'deposits-partial-payments-for-woocommerce') ?></p>17 <p class="awcdp_deposits_summary_title"><?php esc_html_e('Partial payment details', 'deposits-partial-payments-for-woocommerce') ?></p> 18 18 <table class="woocommerce-table awcdp_deposits_summary"> 19 19 <thead>
Note: See TracChangeset for help on using the changeset viewer.