tweak for total_sales, ajax_url
This commit is contained in:
parent
981951723a
commit
a261f05734
|
@ -510,6 +510,9 @@ function woocommerce_process_product_meta( $post_id, $post ) {
|
||||||
|
|
||||||
$woocommerce_errors = array();
|
$woocommerce_errors = array();
|
||||||
|
|
||||||
|
// Add any default post meta
|
||||||
|
add_post_meta( $post_id, 'total_sales', '0', true );
|
||||||
|
|
||||||
// Get types
|
// Get types
|
||||||
$product_type = sanitize_title( stripslashes( $_POST['product-type'] ) );
|
$product_type = sanitize_title( stripslashes( $_POST['product-type'] ) );
|
||||||
$is_downloadable = (isset($_POST['_downloadable'])) ? 'yes' : 'no';
|
$is_downloadable = (isset($_POST['_downloadable'])) ? 'yes' : 'no';
|
||||||
|
|
|
@ -452,7 +452,7 @@ function woocommerce_exclude_image_from_product_page_field_save( $post, $attachm
|
||||||
}
|
}
|
||||||
|
|
||||||
function woocommerce_exclude_image_from_product_page_field_add( $post_id ) {
|
function woocommerce_exclude_image_from_product_page_field_add( $post_id ) {
|
||||||
add_post_meta( $post_id, '_woocommerce_exclude_image', 0);
|
add_post_meta( $post_id, '_woocommerce_exclude_image', 0, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -174,6 +174,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
||||||
* Tweak - Locale settings change placeholder dynamically like the label
|
* Tweak - Locale settings change placeholder dynamically like the label
|
||||||
* Tweak - PayPal standard - separate option for address_override
|
* Tweak - PayPal standard - separate option for address_override
|
||||||
* Tweak - Only show weight/dimensions in bulk/quick edit when enabled
|
* Tweak - Only show weight/dimensions in bulk/quick edit when enabled
|
||||||
|
* Tweak - Add total sales meta to products even if unsold
|
||||||
* Fix - Search/filter compatibility with relevanssi
|
* Fix - Search/filter compatibility with relevanssi
|
||||||
* Fix - Ecommerce tracking enable/disable option
|
* Fix - Ecommerce tracking enable/disable option
|
||||||
* Fix - After tax coupons for categories
|
* Fix - After tax coupons for categories
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ class Woocommerce {
|
||||||
* Domain-mapping safe ajax url
|
* Domain-mapping safe ajax url
|
||||||
*/
|
*/
|
||||||
function ajax_url() {
|
function ajax_url() {
|
||||||
$url = ( is_admin() ) ? admin_url( 'admin-ajax.php' ) : home_url( 'wp-admin/admin-ajax.php' );
|
$url = admin_url( 'admin-ajax.php' );
|
||||||
|
|
||||||
$url = ( is_ssl() ) ? $url : str_replace( 'https', 'http', $url );
|
$url = ( is_ssl() ) ? $url : str_replace( 'https', 'http', $url );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue