Plugin Directory

Changeset 2907456

Timestamp:
05/03/2023 11:40:06 AM (3 years ago)
Author:
acowebscd
Message:

Update to version 1.1.10

Location:
deposits-partial-payments-for-woocommerce
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • deposits-partial-payments-for-woocommerce/tags/1.1.10/includes/class-awcdp-backend.php

    r2896440 r2907456  
    100100        add_filter( "plugin_action_links_$plugin", array( $this, 'add_settings_link' ) );
    101101
    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 );
    103104        add_action('woocommerce_product_data_panels', array($this, 'awcdp_tab_data_panels'));
    104105
     
    297298      }
    298299
     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;
    299310    }
    300311
  • deposits-partial-payments-for-woocommerce/tags/1.1.10/includes/class-awcdp-front-end.php

    r2896440 r2907456  
    207207    }
    208208
    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){
    214217
    215218      if (!apply_filters('awcdp_disable_deposit_condition', true)) { return; }
     
    222225      }
    223226
     227        //global $product;
     228        //echo $this->awcdp_deposits_form( $product->get_id() );
     229               
     230      if( $product_id != ''){
     231        $product_id = $product_id;
     232      } else {
    224233        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 );
    226237
    227238    }
     
    462473              }
    463474
    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 ){
    466478                    $cart_item_meta['awcdp_deposit']['awdp_price'] = $discountedPrice;
    467                   }
     479                }
    468480              }
    469481
     
    18011813      if ($order && $order->get_type() == AWCDP_POST_TYPE) {
    18021814        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        }
    18041818        remove_action('woocommerce_order_details_after_order_table', 'woocommerce_order_again_button');
    18051819      }
  • deposits-partial-payments-for-woocommerce/tags/1.1.10/readme.txt

    r2896440 r2907456  
    77Requires at least: 4.0
    88Tested up to: 6.2
    9 Stable tag: 1.1.9
     9Stable tag: 1.1.10
    1010
    1111WooCommerce Deposits and Partial Payments Plugin helps customers to make payments for the products they buy using a partial payment or a deposit.
     
    123123
    124124== Changelog ==
     125= 1.1.10 =
     126* Deposit shortcode update
    125127= 1.1.9 =
    126128* Support for WordPress 6.2
  • deposits-partial-payments-for-woocommerce/tags/1.1.10/start.php

    r2896440 r2907456  
    22/*
    33 * Plugin Name: Deposits & Partial Payments for WooCommerce
    4  * Version: 1.1.9
     4 * Version: 1.1.10
    55 * Description: WooCommerce deposits allows customers to pay for products using a fixed or percentage amount in WooCommerce store
    66 * Author: Acowebs
     
    1010 * Text Domain: deposits-partial-payments-for-woocommerce
    1111 * WC requires at least: 4.0.0
    12  * WC tested up to: 7.5
     12 * WC tested up to: 7.6
    1313 */
    1414
    1515define('AWCDP_TOKEN', 'awcdp');
    16 define('AWCDP_VERSION', '1.1.9');
     16define('AWCDP_VERSION', '1.1.10');
    1717define('AWCDP_FILE', __FILE__);
    1818define('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  
    1515?>
    1616
    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>
    1818<table class="woocommerce-table  awcdp_deposits_summary">
    1919  <thead>
  • deposits-partial-payments-for-woocommerce/trunk/includes/class-awcdp-backend.php

    r2896440 r2907456  
    100100        add_filter( "plugin_action_links_$plugin", array( $this, 'add_settings_link' ) );
    101101
    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 );
    103104        add_action('woocommerce_product_data_panels', array($this, 'awcdp_tab_data_panels'));
    104105
     
    297298      }
    298299
     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;
    299310    }
    300311
  • deposits-partial-payments-for-woocommerce/trunk/includes/class-awcdp-front-end.php

    r2896440 r2907456  
    207207    }
    208208
    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){
    214217
    215218      if (!apply_filters('awcdp_disable_deposit_condition', true)) { return; }
     
    222225      }
    223226
     227        //global $product;
     228        //echo $this->awcdp_deposits_form( $product->get_id() );
     229               
     230      if( $product_id != ''){
     231        $product_id = $product_id;
     232      } else {
    224233        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 );
    226237
    227238    }
     
    462473              }
    463474
    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 ){
    466478                    $cart_item_meta['awcdp_deposit']['awdp_price'] = $discountedPrice;
    467                   }
     479                }
    468480              }
    469481
     
    18011813      if ($order && $order->get_type() == AWCDP_POST_TYPE) {
    18021814        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        }
    18041818        remove_action('woocommerce_order_details_after_order_table', 'woocommerce_order_again_button');
    18051819      }
  • deposits-partial-payments-for-woocommerce/trunk/readme.txt

    r2896440 r2907456  
    77Requires at least: 4.0
    88Tested up to: 6.2
    9 Stable tag: 1.1.9
     9Stable tag: 1.1.10
    1010
    1111WooCommerce Deposits and Partial Payments Plugin helps customers to make payments for the products they buy using a partial payment or a deposit.
     
    123123
    124124== Changelog ==
     125= 1.1.10 =
     126* Deposit shortcode update
    125127= 1.1.9 =
    126128* Support for WordPress 6.2
  • deposits-partial-payments-for-woocommerce/trunk/start.php

    r2896440 r2907456  
    22/*
    33 * Plugin Name: Deposits & Partial Payments for WooCommerce
    4  * Version: 1.1.9
     4 * Version: 1.1.10
    55 * Description: WooCommerce deposits allows customers to pay for products using a fixed or percentage amount in WooCommerce store
    66 * Author: Acowebs
     
    1010 * Text Domain: deposits-partial-payments-for-woocommerce
    1111 * WC requires at least: 4.0.0
    12  * WC tested up to: 7.5
     12 * WC tested up to: 7.6
    1313 */
    1414
    1515define('AWCDP_TOKEN', 'awcdp');
    16 define('AWCDP_VERSION', '1.1.9');
     16define('AWCDP_VERSION', '1.1.10');
    1717define('AWCDP_FILE', __FILE__);
    1818define('AWCDP_PLUGIN_NAME', 'Deposits & Partial Payments for WooCommerce');
  • deposits-partial-payments-for-woocommerce/trunk/templates/order/awcdp-partial-payment-details.php

    r2785094 r2907456  
    1515?>
    1616
    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>
    1818<table class="woocommerce-table  awcdp_deposits_summary">
    1919  <thead>
Note: See TracChangeset for help on using the changeset viewer.