WC_Admin_List_Table_Coupons::prepare_row_data( int $post_id )

Pre-fetch any data for the row each column has access to it. the_coupon global is there for bw compat.


Description Description


Parameters Parameters

$post_id

(Required) Post ID being shown.


Top ↑

Source Source

File: includes/admin/list-tables/class-wc-admin-list-table-coupons.php

	protected function prepare_row_data( $post_id ) {
		global $the_coupon;

		if ( empty( $this->object ) || $this->object->get_id() !== $post_id ) {
			$this->object = new WC_Coupon( $post_id );
			$the_coupon   = $this->object;
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.