Plugin Directory

Changeset 1472995


Ignore:
Timestamp:
08/12/2016 11:21:05 AM (10 years ago)
Author:
JohnnyPea
Message:

Amend v1.5.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-superfaktura/trunk/class-wc-superfaktura.php

    r1472846 r1472995  
    572572        else
    573573        {
    574             $invoice_id = get_option('woocommerce_sf_invoice_custom_num')=='yes' ? $this->generate_invoice_id($order,$type) : '';
     574            $invoice_id = apply_filters( 'wc_sf_invoice_id', false, $type, $order );
     575
     576            if ( ! $invoice_id ) {
     577                $invoice_id = get_option('woocommerce_sf_invoice_custom_num')=='yes' ? $this->generate_invoice_id($order,$type) : '';
     578            }
    575579
    576580            $api->setInvoice(array(
     
    11611165        ) );
    11621166
    1163         $invoice_id = apply_filters( 'wc_sf_invoice_id', $invoice_id, $key, $order );
    1164 
    11651167        update_post_meta($order_id, 'wc_sf_invoice_'.$key.'_id', $invoice_id);
    11661168
Note: See TracChangeset for help on using the changeset viewer.