Missing $wpdb
This commit is contained in:
parent
f034e1f69d
commit
7d8bacc2b3
|
@ -191,6 +191,8 @@ class WC_REST_Coupons_Controller extends WC_REST_Posts_Controller {
|
|||
* @return WP_Error|stdClass $data Post object.
|
||||
*/
|
||||
protected function prepare_item_for_database( $request ) {
|
||||
global $wpdb;
|
||||
|
||||
$id = isset( $request['id'] ) ? absint( $request['id'] ) : 0;
|
||||
$coupon = new WC_Coupon( $id );
|
||||
$schema = $this->get_item_schema();
|
||||
|
|
Loading…
Reference in New Issue