More hook changes

This commit is contained in:
Mike Jolley 2011-09-21 16:43:37 +01:00
parent 438b31f9a6
commit faa53c50d6
7 changed files with 18 additions and 18 deletions

View File

@ -80,7 +80,7 @@ function downloadable_product_write_panel_js() {
});
<?php
}
add_action('product_write_panel_js', 'downloadable_product_write_panel_js');
add_action('woocommerce_product_write_panel_js', 'downloadable_product_write_panel_js');
add_filter( 'gettext', 'woocommerce_change_insert_into_post', null, 2 );
@ -115,4 +115,4 @@ function process_product_meta_downloadable( $post_id ) {
if (isset($_POST['download_limit'])) update_post_meta( $post_id, 'download_limit', $_POST['download_limit'] );
}
add_action('process_product_meta_downloadable', 'process_product_meta_downloadable');
add_action('woocommerce_process_product_meta_downloadable', 'process_product_meta_downloadable');

View File

@ -317,7 +317,7 @@ function variable_product_write_panel_js() {
<?php
}
add_action('product_write_panel_js', 'variable_product_write_panel_js');
add_action('woocommerce_product_write_panel_js', 'variable_product_write_panel_js');
/**
@ -607,4 +607,4 @@ function process_product_meta_variable( $post_id ) {
endif;
}
add_action('process_product_meta_variable', 'process_product_meta_variable');
add_action('woocommerce_process_product_meta_variable', 'process_product_meta_variable');

View File

@ -32,7 +32,7 @@ function woocommerce_product_data_box() {
<li><a href="#woocommerce_attributes"><?php _e('Attributes', 'woothemes'); ?></a></li>
<li><a href="#upsell_product_data" title="<?php _e('Up-sells are products which you recommend instead of the currently viewed product, for example, products that are more profitable or better quality or more expensive.', 'woothemes'); ?>"><?php _e('Up-sells', 'woothemes'); ?></a></li>
<li><a href="#crosssell_product_data" title="<?php _e('Cross-sells are products which you promote in the cart, based on the current product.', 'woothemes'); ?>"><?php _e('Cross-sells', 'woothemes'); ?></a></li>
<?php do_action('product_write_panel_tabs'); ?>
<?php do_action('woocommerce_product_write_panel_tabs'); ?>
</ul>
<div id="general_product_data" class="panel woocommerce_options_panel"><?php
@ -346,7 +346,7 @@ function woocommerce_product_data_box() {
<div class="clear"></div>
</div>
<?php do_action('product_write_panels'); ?>
<?php do_action('woocommerce_product_write_panels'); ?>
</div>
<?php
@ -590,10 +590,10 @@ function woocommerce_process_product_meta( $post_id, $post ) {
endif;
// Do action
do_action( 'process_product_meta', $post_id );
do_action( 'woocommerce_process_product_meta', $post_id );
// Do action for product type
do_action( 'process_product_meta_' . $product_type, $post_id );
do_action( 'woocommerce_process_product_meta_' . $product_type, $post_id );
// Save errors
update_option('woocommerce_errors', $woocommerce_errors);

View File

@ -193,7 +193,7 @@ function woocommerce_meta_scripts() {
?>
<script type="text/javascript">
jQuery(function(){
<?php do_action('product_write_panel_js'); ?>
<?php do_action('woocommerce_product_write_panel_js'); ?>
});
</script>
<?php

View File

@ -349,8 +349,8 @@ class woocommerce_order {
if ( $this->status != $new_status->slug ) :
// Status was changed
do_action( 'order_status_'.$new_status->slug, $this->id );
do_action( 'order_status_'.$this->status.'_to_'.$new_status->slug, $this->id );
do_action( 'woocommerce_order_status_'.$new_status->slug, $this->id );
do_action( 'woocommerce_order_status_'.$this->status.'_to_'.$new_status->slug, $this->id );
$this->add_order_note( $note . sprintf( __('Order status changed from %s to %s.', 'woothemes'), $this->status, $new_status->slug ) );
clean_term_cache( '', 'shop_order_status' );
endif;

View File

@ -766,7 +766,7 @@ function woocommerce_download_product() {
/**
* Order Status completed - GIVE DOWNLOADABLE PRODUCT ACCESS TO CUSTOMER
**/
add_action('order_status_completed', 'woocommerce_downloadable_product_permissions');
add_action('woocommerce_order_status_completed', 'woocommerce_downloadable_product_permissions');
function woocommerce_downloadable_product_permissions( $order_id ) {

View File

@ -120,9 +120,9 @@ add_action('woocommerce_product_on_backorder_notification', 'woocommerce_product
/**
* New order notification email template
**/
add_action('order_status_pending_to_processing', 'woocommerce_new_order_notification');
add_action('order_status_pending_to_completed', 'woocommerce_new_order_notification');
add_action('order_status_pending_to_on-hold', 'woocommerce_new_order_notification');
add_action('woocommerce_order_status_pending_to_processing', 'woocommerce_new_order_notification');
add_action('woocommerce_order_status_pending_to_completed', 'woocommerce_new_order_notification');
add_action('woocommerce_order_status_pending_to_on-hold', 'woocommerce_new_order_notification');
function woocommerce_new_order_notification( $id ) {
@ -152,8 +152,8 @@ function woocommerce_new_order_notification( $id ) {
/**
* Processing order notification email template
**/
add_action('order_status_pending_to_processing', 'woocommerce_processing_order_customer_notification');
add_action('order_status_pending_to_on-hold', 'woocommerce_processing_order_customer_notification');
add_action('woocommerce_order_status_pending_to_processing', 'woocommerce_processing_order_customer_notification');
add_action('woocommerce_order_status_pending_to_on-hold', 'woocommerce_processing_order_customer_notification');
function woocommerce_processing_order_customer_notification( $id ) {
@ -184,7 +184,7 @@ function woocommerce_processing_order_customer_notification( $id ) {
/**
* Completed order notification email template - this one includes download links for downloadable products
**/
add_action('order_status_completed', 'woocommerce_completed_order_customer_notification');
add_action('woocommerce_order_status_completed', 'woocommerce_completed_order_customer_notification');
function woocommerce_completed_order_customer_notification( $id ) {