Change reminder email date to 14 days before

I want to send the reminder email for a booking (from the Woocommerce Booking plugin) 14 days before the activity instead of the default 1. I have found the following code online and added it to wp-content/themes/flatsome-child/functions.php but none of them seem to trigger or work.

add_filter( 'woocommerce_bookings_remind_before_days', 'drop_reminder_days', 10 );
function drop_reminder_days($value) {
    error_log(===== this is the amount of days ======);
    error_log($value);
    return 14;
}
add_filter( 'woocommerce_bookings_remind_before_days', function() {return 14;}, 10, 2 );
add_filter( 'woocommerce_bookings_remind_before_days', create_function( '', 'return 3;' ) );

Any Idea how to fix this?

Topic woocommerce-offtopic plugin-development Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.