Code Duplication    Length = 8-10 lines in 2 locations

includes/class-wc-order-refund.php 2 locations

@@ 47-56 (lines=10) @@
44
	 * Insert data into the database.
45
	 * @since 2.7.0
46
	 */
47
	public function create() {
48
		parent::create();
49
50
		// Store additonal order data
51
		if ( $this->get_id() ) {
52
			$this->update_post_meta( '_refund_amount', $this->get_amount() );
53
			$this->update_post_meta( '_refunded_by', $this->get_refunded_by() );
54
			$this->update_post_meta( '_refund_reason', $this->get_reason() );
55
		}
56
	}
57
58
	/**
59
	 * Read from the database.
@@ 83-90 (lines=8) @@
80
	 * Update data in the database.
81
	 * @since 2.7.0
82
	 */
83
	public function update() {
84
		parent::update();
85
86
		// Store additonal order data
87
		$this->update_post_meta( '_refund_amount', $this->get_amount() );
88
		$this->update_post_meta( '_refunded_by', $this->get_refunded_by() );
89
		$this->update_post_meta( '_refund_reason', $this->get_reason() );
90
	}
91
92
	/**
93
	 * Get internal type (post type.)