woocommerce_rest_pre_insert_{$this->post_type}

woocommerce_rest_pre_insert_{$this->post_type}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_rest_pre_insert_{$this->post_type}') is found 4 times:

  • /includes/rest-api/Controllers/Version1/class-wc-rest-coupons-v1-controller.php line 301
    		 *
    		 * @param WC_Coupon       $coupon        The coupon object.
    		 * @param WP_REST_Request $request       Request object.
    		 */
    		return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $coupon, $request );
    	}
    
    	/**
    	 * Create a single item.
    	 *
    	 * @param WP_REST_Request $request Full details about the request.
    
  • /includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php line 506
    		 *
    		 * @param WC_Order           $order      The order object.
    		 * @param WP_REST_Request    $request    Request object.
    		 */
    		return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $order, $request );
    	}
    
    	/**
    	 * Create base WC Order object.
    	 * @deprecated 3.0.0
    	 * @param array $data
    
  • /includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php line 730
    		 * @param WC_Product       $product An object representing a single item prepared
    		 *                                       for inserting or updating the database.
    		 * @param WP_REST_Request $request       Request object.
    		 */
    		return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $product, $request );
    	}
    
    	/**
    	 * Create a single product.
    	 *
    	 * @param WP_REST_Request $request Full details about the request.
    
  • /includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php line 550
    		 * @param stdClass        $data An object representing a single item prepared
    		 *                                       for inserting or updating the database.
    		 * @param WP_REST_Request $request       Request object.
    		 */
    		return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}", $data, $request );
    	}
    
    	/**
    	 * Prepare a single webhook output for response.
    	 *
    	 * @param int             $id       Webhook ID or object.