Skip to content

Actions and filters

Free votes: 2 hooks.

Every hook here has a description in the source.

2 actions0 filters

action

davo_free_vote_consumed

Fires after a user successfully consumes one free vote.

Parameters of davo_free_vote_consumed
ParameterTypeDescription
$user_idintThe user who consumed the free vote.
$week_startstring'Y-m-d' Monday date of the current bucket.
add_action
add_action( 'davo_free_vote_consumed', 'my_action_callback', 10, 2 );

/**
 * @param int $user_id
 * @param string $week_start
 */
function my_action_callback( $user_id, $week_start ) {
	// Your code here.
}

src/domains/free-votes/repository.php:94

action

davo_free_vote_released

Fires after a user's previously consumed free vote is refunded.

Parameters of davo_free_vote_released
ParameterTypeDescription
$user_idintThe user whose free vote was refunded.
$week_startstring'Y-m-d' Monday date of the current bucket.
add_action
add_action( 'davo_free_vote_released', 'my_action_callback', 10, 2 );

/**
 * @param int $user_id
 * @param string $week_start
 */
function my_action_callback( $user_id, $week_start ) {
	// Your code here.
}

src/domains/free-votes/repository.php:123

Note. Generated from the plugin source. Descriptions and parameters are the ones written in the code. The starter code uses the parameter names from those comments, or generic names where there are none, so check them against your use.

See it on your own site.

Davo is a WordPress theme and plugin by Exorex.

  • Runs on your own WordPress
  • Guided setup wizard
  • AI is off until you switch it on
  • Read the licence on the marketplace first