WordPress at a glance
function is not described

delete_post_meta_by_key() WP 2.3.0

Deletes everything from post meta matching the given meta key.

No Hooks.


true/false. Whether the post meta key was deleted from the database.


delete_post_meta_by_key( $post_meta_key );
$post_meta_key(string) (required)
Key to search for when deleting.

Code of delete post meta by key: wp-includes/post.php WP 5.2.2

function delete_post_meta_by_key( $post_meta_key ) {
	return delete_metadata( 'post', null, $post_meta_key, '', true );