WC_Admin_List_Table_Coupons::prepare_row_data
Pre-fetch any data for the row each column has access to it. the_coupon global is there for bw compat.
Method of the class: WC_Admin_List_Table_Coupons{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->prepare_row_data( $post_id );
- $post_id(int) (required)
- Post ID being shown.
WC_Admin_List_Table_Coupons::prepare_row_data() WC Admin List Table Coupons::prepare row data code WC 10.8.1
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;
}
}