Copy_Recipe_Parts::copy_recipe_metas( $post_id,  $new_post_id,  $post_parent )


Parameters Parameters

$post_id

(Required)

$new_post_id

(Required)


Source Source

File: src/core/admin/class-copy-recipe-parts.php

	public function copy_recipe_metas( $post_id, $new_post_id, $post_parent = 0 ) {
		$recipe_meta = get_post_meta( $post_id );

		foreach ( $recipe_meta as $key => $value ) {
			$val = maybe_unserialize( $value[0] );
			$val = $this->modify_tokens( $val, $post_parent, $new_post_id );
			update_post_meta( $new_post_id, $key, $val );
		}
	}