ActionScheduler_DBStore::get_placeholder_for_column()privateWC 1.0

Helper method to get $wpdb->prepare placeholder for a given column name.

Method of the class: ActionScheduler_DBStore{}

No Hooks.

Return

String. Placeholder to use for given column.

Usage

// private - for code of main (parent) class only
$result = $this->get_placeholder_for_column( $column_name );
$column_name(string) (required)
Name of column in actions table.

ActionScheduler_DBStore::get_placeholder_for_column() code WC 9.4.2

private function get_placeholder_for_column( $column_name ) {
	$string_columns = array(
		'hook',
		'status',
		'scheduled_date_gmt',
		'scheduled_date_local',
		'args',
		'schedule',
		'last_attempt_gmt',
		'last_attempt_local',
		'extended_args',
	);

	return in_array( $column_name, $string_columns ) ? '%s' : '%d';
}