eugenio.se
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Widget With Filter order by sale PROBLEMnow works PERFECTLY
function reset_post_date_wpse_121565($data,$postarr) {
if($data[‘post_type’] !== ‘product’)
return $data;$data[‘post_date’] = $data[‘post_modified’];
$data[‘post_date_gmt’] = $data[‘post_modified_gmt’];
return $data;
}
add_filter(‘wp_insert_post_data’,’reset_post_date_wpse_121565′,99,2);Forum: Plugins
In reply to: [WooCommerce] Widget With Filter order by sale PROBLEMyou’re right, unfortunately also it affects posts.
I hope someone will help me to change it so it hits only products woocommerce.
Forum: Plugins
In reply to: [WooCommerce] Widget With Filter order by sale PROBLEMI know, but it is unprofessional.
Forum: Plugins
In reply to: [WooCommerce] Widget With Filter order by sale PROBLEMThere is now way to auto-update post date only of woocommerce product?
I found this, but is for all WP POST:
function reset_post_date_wpse_121565($data,$postarr) {
// var_dump($data,$postarr); die; // debug
$data[‘post_date’] = $data[‘post_modified’];
$data[‘post_date_gmt’] = $data[‘post_modified_gmt’];
return $data;
}
add_filter(‘wp_insert_post_data’,’reset_post_date_wpse_121565′,99,2);Is applicable only for Woocommerce post type?
Forum: Plugins
In reply to: [WooCommerce] Widget With Filter order by sale PROBLEMBut if i chose date, and i make a discount on an old product?
Forum: Plugins
In reply to: [WP Super Cache] Clear cache when category or widget updateup