Hooks. Closes #1245.
This commit is contained in:
parent
23e67b0a9d
commit
c124058bd5
|
@ -779,8 +779,10 @@ function woocommerce_process_shop_order_meta( $post_id, $post ) {
|
|||
|
||||
$order->add_order_note( __('Manual stock reduction complete.', 'woocommerce') );
|
||||
|
||||
do_action( 'woocommerce_reduce_order_stock', $order );
|
||||
|
||||
elseif (isset($_POST['restore_stock']) && $_POST['restore_stock'] && sizeof($order_items)>0) :
|
||||
|
||||
|
||||
$order->add_order_note( __('Manually restoring stock.', 'woocommerce') );
|
||||
|
||||
foreach ($order_items as $order_item) :
|
||||
|
@ -807,17 +809,19 @@ function woocommerce_process_shop_order_meta( $post_id, $post ) {
|
|||
|
||||
endforeach;
|
||||
|
||||
do_action( 'woocommerce_restore_order_stock', $order );
|
||||
|
||||
$order->add_order_note( __('Manual stock restore complete.', 'woocommerce') );
|
||||
|
||||
do_action( 'woocommerce_restore_order_stock', $order );
|
||||
|
||||
elseif (isset($_POST['invoice']) && $_POST['invoice']) :
|
||||
|
||||
// Mail link to customer
|
||||
global $woocommerce;
|
||||
do_action( 'woocommerce_before_send_customer_invoice', $order );
|
||||
|
||||
$mailer = $woocommerce->mailer();
|
||||
$mailer->customer_invoice( $order );
|
||||
|
||||
do_action( 'woocommerce_after__customer_invoice', $order );
|
||||
|
||||
endif;
|
||||
|
||||
delete_transient( 'woocommerce_processing_order_count' );
|
||||
|
|
|
@ -180,6 +180,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Fix - When adding multiple items to an order, saving lost all by the first
|
||||
* Localization - LI and CH address locales
|
||||
* Localization - Switch fields in array if postcode_before_city is set
|
||||
* Localization - German (formal) update (thanks jjoeris)
|
||||
|
||||
= 1.5.8 - 21/06/2012 =
|
||||
* Tweak - Textarea for notes and enabled HTML
|
||||
|
|
Loading…
Reference in New Issue