Plugin Directory

Changeset 1804788


Ignore:
Timestamp:
01/17/2018 09:20:30 PM (8 years ago)
Author:
drumba
Message:

Release 1.6.0, see readme.txt for the changelog.

Location:
edd-fastbill
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • edd-fastbill/tags/1.6.0/edd-fastbill.php

    r1592803 r1804788  
    66Author: Markus Drubba
    77Author URI: http://markusdrubba.de
    8 Version: 1.5.1
     8Version: 1.6.0
    99Text Domain: edd-fastbill
    1010Domain Path: /languages
  • edd-fastbill/tags/1.6.0/includes/payment-actions.php

    r1592803 r1804788  
    3030        $this->edd_options    = $edd_options;
    3131        $this->fastbill       = $fastbill;
    32         $this->create_payment = isset( $this->edd_options['drubba_fb_fastbill_payments'] ) ? $this->edd_options['drubba_fb_fastbill_payments'] : 0;
    33         $this->invoice_status = isset( $this->edd_options['drubba_fb_fastbill_invoice_status'] ) ? $this->edd_options['drubba_fb_fastbill_invoice_status'] : 'draft';
     32        $this->create_payment = 1;
     33        $this->invoice_status = 'complete';
    3434        $this->send_invoice   = isset( $this->edd_options['drubba_fb_fastbill_sendbyemail'] ) ? $this->edd_options['drubba_fb_fastbill_sendbyemail'] : 0;
    3535
     
    3939        add_action( 'edd_update_payment_status', [ $this, 'on_update_payment_status' ], 10, 3 );
    4040        add_action( 'edd_insert_payment', [ $this, 'on_insert_payment' ], 10, 2 );
     41        add_action( 'edd_recurring_record_payment', [ $this, 'on_record_reccuring_payment' ], 10, 4 );
    4142    }
    4243
     
    6465        }
    6566    }
     67
     68    /**
     69     * Support for "EDD Recurring Payments" addon
     70     *
     71     * @since 1.6.0
     72     *
     73     * @param $payment_id
     74     * @param $parent_id
     75     * @param $amount
     76     * @param $txn_id
     77     */
     78    public function on_record_reccuring_payment( $payment_id, $parent_id, $amount, $txn_id ) {
     79
     80        $this->payment_id = $payment_id;
     81
     82        // create invoice for $payment_id
     83        $this->fastbill->invoice_create( $this->payment_id, 'direct' );
     84
     85        // create payment if activated
     86        if ( $this->create_payment == 1 ) {
     87            $this->fastbill->payment_create( $this->payment_id );
     88        }
     89
     90        // send invoice by email if activated
     91        if ( $this->send_invoice == 1 ) {
     92            $this->fastbill->invoice_sendbyemail( $this->payment_id );
     93        }
     94    }
    6695
    6796    private function _on_payment_status_pending() {
  • edd-fastbill/tags/1.6.0/readme.txt

    r1592803 r1804788  
    44Tags: Easy Digital Downloads, EDD, Fastbill, Accounting, Invoice
    55Requires at least: 4.5
    6 Tested up to: 4.7.2
    7 Stable tag: 1.5.1
     6Tested up to: 4.9.2
     7Stable tag: 1.6.0
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3939
    4040== Changelog ==
     41
     42= 2018-01-17 1.6.0 =
     43
     44* New: added support for EDD Reccuring Payments addon (props to @flowdee)
     45* Fixed: removed no longer existent dependency for creating payment and invoice status settings (props to @flowdee)
    4146
    4247= 2017-02-09 1.5.1 =
  • edd-fastbill/trunk/edd-fastbill.php

    r1592803 r1804788  
    66Author: Markus Drubba
    77Author URI: http://markusdrubba.de
    8 Version: 1.5.1
     8Version: 1.6.0
    99Text Domain: edd-fastbill
    1010Domain Path: /languages
  • edd-fastbill/trunk/includes/payment-actions.php

    r1592803 r1804788  
    3030        $this->edd_options    = $edd_options;
    3131        $this->fastbill       = $fastbill;
    32         $this->create_payment = isset( $this->edd_options['drubba_fb_fastbill_payments'] ) ? $this->edd_options['drubba_fb_fastbill_payments'] : 0;
    33         $this->invoice_status = isset( $this->edd_options['drubba_fb_fastbill_invoice_status'] ) ? $this->edd_options['drubba_fb_fastbill_invoice_status'] : 'draft';
     32        $this->create_payment = 1;
     33        $this->invoice_status = 'complete';
    3434        $this->send_invoice   = isset( $this->edd_options['drubba_fb_fastbill_sendbyemail'] ) ? $this->edd_options['drubba_fb_fastbill_sendbyemail'] : 0;
    3535
     
    3939        add_action( 'edd_update_payment_status', [ $this, 'on_update_payment_status' ], 10, 3 );
    4040        add_action( 'edd_insert_payment', [ $this, 'on_insert_payment' ], 10, 2 );
     41        add_action( 'edd_recurring_record_payment', [ $this, 'on_record_reccuring_payment' ], 10, 4 );
    4142    }
    4243
     
    6465        }
    6566    }
     67
     68    /**
     69     * Support for "EDD Recurring Payments" addon
     70     *
     71     * @since 1.6.0
     72     *
     73     * @param $payment_id
     74     * @param $parent_id
     75     * @param $amount
     76     * @param $txn_id
     77     */
     78    public function on_record_reccuring_payment( $payment_id, $parent_id, $amount, $txn_id ) {
     79
     80        $this->payment_id = $payment_id;
     81
     82        // create invoice for $payment_id
     83        $this->fastbill->invoice_create( $this->payment_id, 'direct' );
     84
     85        // create payment if activated
     86        if ( $this->create_payment == 1 ) {
     87            $this->fastbill->payment_create( $this->payment_id );
     88        }
     89
     90        // send invoice by email if activated
     91        if ( $this->send_invoice == 1 ) {
     92            $this->fastbill->invoice_sendbyemail( $this->payment_id );
     93        }
     94    }
    6695
    6796    private function _on_payment_status_pending() {
  • edd-fastbill/trunk/readme.txt

    r1592803 r1804788  
    44Tags: Easy Digital Downloads, EDD, Fastbill, Accounting, Invoice
    55Requires at least: 4.5
    6 Tested up to: 4.7.2
    7 Stable tag: 1.5.1
     6Tested up to: 4.9.2
     7Stable tag: 1.6.0
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3939
    4040== Changelog ==
     41
     42= 2018-01-17 1.6.0 =
     43
     44* New: added support for EDD Reccuring Payments addon (props to @flowdee)
     45* Fixed: removed no longer existent dependency for creating payment and invoice status settings (props to @flowdee)
    4146
    4247= 2017-02-09 1.5.1 =
Note: See TracChangeset for help on using the changeset viewer.