- This topic has 11 replies, 2 voices, and was last updated 6 years, 3 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Show only items with value=””
Tagged: Checkmark, Empty value
Thank you for your suggestions. Changing the NULL value to a word worked perfectly. I wrote this and it seems to be working just like I needed it to.
//Add flatrate to database
add_action( 'woocommerce_update_product', 'hm_sync_on_product_save', 10, 1 );
function hm_sync_on_product_save( $product_id ) {
$product = wc_get_product( $product_id );
$person_multiplier = get_post_meta( $product_id, '_wc_booking_person_cost_multiplier', true);
if( empty( $person_multiplier )){
update_post_meta($product_id, '_wc_booking_person_cost_multiplier', 'false');
}
}