Skip to content

Instantly share code, notes, and snippets.

@PluginHive
Created December 21, 2019 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PluginHive/d2e6f9616ec523ac9c9a692e08f9b3b6 to your computer and use it in GitHub Desktop.
Save PluginHive/d2e6f9616ec523ac9c9a692e08f9b3b6 to your computer and use it in GitHub Desktop.
Change block count based on number of clicks in non adjacent booking plugin for participant rule
add_filter( 'ph_non_adjacent_bookings_multiply_cost_with_block_before_calc', 'ph_non_adjacent_bookings_multiply_cost_with_block_before_calc',10,2 );
function ph_non_adjacent_bookings_multiply_cost_with_block_before_calc( $true_false,$product_id='' ) {
return true;
}
add_filter( 'ph_multiple_non_adjacent_participant_applied_cost', 'ph_multiple_non_adjacent_participant_applied_cost_condition',10,2 );
function ph_multiple_non_adjacent_participant_applied_cost_condition( $query='' ) {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment