public/wordpress/wp-content/plugins/wp-courseware/includes/functions/courses.php
/**
 * Update Course Meta Field.
 *
 * Use the $prev_value parameter to differentiate between
 * meta fields with the same key and Course ID. If the meta
 * field for the customer does not exist, it will be added.
 *
 * @since 4.4.5
 *
 * @param int $course_id The Course ID.
 * @param string $meta_key The Course Meta Key.
 * @param mixed $meta_value The Course Meta Value.
 * @param mixed $prev_value Optional. Previous value to check before removing.
 *
 * @return bool False on failure, True if successful.
 */
Update Course Meta Field.
Use the $prev_value parameter to differentiate between
meta fields with the same key and Course ID. If the meta
field for the customer does not exist, it will be added.



@param int $course_id The Course ID.
@param string $meta_key The Course Meta Key.
@param mixed $meta_value The Course Meta Value.
@param mixed $prev_value Optional. Previous value to check before removing.

@return bool False on failure, True if successful.
Update Course Meta Field . Use the $prev_value parameter to differentiate between meta fields with the same key and Course ID . If the meta field for the customer does not exist it will be added . @param int $course_id The Course ID . @param string $meta_key The Course Meta Key . @param mixed $meta_value The Course Meta Value . @param mixed $prev_value Optional . Previous value to check before removing . @return bool False on failure True if successful .
function wpcw_update_course_meta( $course_id = 0, $meta_key = '', $meta_value, $prev_value = '' ) {
	$course_id = wpcw_sanitize_course_id( $course_id );
	if ( false === $course_id ) {
		return false;
	}
	return update_metadata( 'wpcw_course', $course_id, $meta_key, $meta_value, $prev_value );
}
function wpcw_update_course_meta ( $ course_id = 0 , $ meta_key = '' , $ meta_value , $ prev_value = '' ) { $ course_id = wpcw_sanitize_course_id ( $ course_id ) ; if ( false === $ course_id ) { return false ; } return update_metadata ( 'wpcw_course' , $ course_id , $ meta_key , $ meta_value , $ prev_value ) ; }
Update Course Meta Field.
Update Course Meta Field .