ode() );
return new WP_Error( 'woocommerce_rest_' . $error_code, __( 'Product review field exceeds maximum length allowed.', 'woocommerce' ), array( 'status' => 400 ) );
}
$updated = wp_update_comment( wp_slash( (array) $prepared_args ) );
if ( false === $updated ) {
return new WP_Error( 'woocommerce_rest_comment_failed_edit', __( 'Updating review failed.', 'woocommerce' ), array( 'status' => 500 ) );
}
if ( isset( $request['status'] ) ) {
$this->handle_status_param( $request['status'], $id );
}
}
if ( ! empty( $request['rating'] ) ) {
update_comment_meta( $id, 'rating', $request['rating'] );
}
if ( isset( $request['verified'] ) && ! empty( $request['verified'] ) ) {
update_comment_meta( $id, 'verified', $request['verified'] );
}
$review = get_comment( $id );
/** This action is documented in includes/api/class-wc-rest-product-reviews-controller.php */
do_action( 'woocommerce_rest_insert_product_review', $review, $request, false );
$fields_update = $this->update_additional_fields_for_object( $review, $request );
if ( is_wp_error( $fields_update ) ) {
return $fields_update;
}
$request->set_param( 'context', 'edit' );
$response = $this->prepare_item_for_response( $review, $request );
return rest_ensure_response( $response );
}
/**
* Deletes a review.
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
*/
public function delete_item( $request ) {
$review = $this->get_review( $request['id'] );
if ( is_wp_error( $review ) ) {
return $review;
}
$force = isset( $request['force'] ) ? (bool) $request['force'] : false;
/**
* Filters whether a review can be trashed.
*
* Return false to disable trash support for the post.
*
* @since 3.5.0
* @param bool $supports_trash Whether the post type support trashing.
* @param WP_Comment $review The review object being considered for trashing support.
*/
$supports_trash = apply_filters( 'woocommerce_rest_product_review_trashable', ( EMPTY_TRASH_DAYS > 0 ), $review );
$request->set_param( 'context', 'edit' );
if ( $force ) {
$previous = $this->prepare_item_for_response( $review, $request );
$result = wp_delete_comment( $review->comment_ID, true );
$response = new WP_REST_Response();
$response->set_data(
array(
'deleted' => true,
'previous' => $previous->get_data(),
)
);
} else {
// If this type doesn't support trashing, error out.
if ( ! $supports_trash ) {
/* translators: %s: force=true */
return new WP_Error( 'woocommerce_rest_trash_not_supported', sprintf( __( "The object does not support trashing. Set '%s' to delete.", 'woocommerce' ), 'force=true' ), array( 'status' => 501 ) );
}
if ( 'trash' === $review->comment_approved ) {
return new WP_Error( 'woocommerce_rest_already_trashed', __( 'The object has already been trashed.', 'woocommerce' ), array( 'status' => 410 ) );
}
$result = wp_trash_comment( $review->comment_ID );
$review = get_comment( $review->comment_ID );
$response = $this->prepare_item_for_response( $review, $request );
}
if ( ! $result ) {
return new WP_Error( 'woocommerce_rest_cannot_delete', __( 'The object cannot be deleted.', 'woocommerce' ), array( 'status' => 500 ) );
}
/**
* Fires after a review is deleted via the REST API.
*
* @param WP_Comment $review The deleted review data.
* @param WP_REST_Response $response The response returned from the API.
* @param WP_REST_Request $request The request sent to the API.
*/
do_action( 'woocommerce_rest_delete_review', $revi
High-Quality Gates and automation | Mulholland Contracts
Expert Metal Fabrication Our team of skilled professionals use the latest tools and techniques in manufacturing to create high-quality products for our clients.
Bespoke Services In addition to our standard range of products, we also offer bespoke services for clients who require a unique solution for their project.
Onsite Maintenance and Repair Our team is equipped to handle onsite maintenance and repair services for all types of metal structures, ensuring that they are always functioning at their best.
Affordable Solutions We believe that quality products and services should be accessible to all.
Quality Products Welcome to Mulhollands Contracts Our company specializes in offering top-notch metal fabrication services for manufacturing gates, railings, bollards, staircases and structural steel. Let us work with you to bring your vision to life.
Your Preferred Gate Automation Specialists Mulhollands Contracts At Mulhollands Contracts, we pride ourselves on being the top gate automation specialists and access control field.
Discover the Power of Structural Steel Quality Products and Services At Mulhollands Contracts, we take pride in our manufacturing expertise. From wind posts to steel sheds, we have you covered.
Custom Made Steel Furniture Our Specialty At Mulhollands Contracts, we take pride in creating high-quality, custom made steel furniture for our clients. Our specialty lies in the manufacturing of steel furniture, making us the top choice for all your furniture needs.
step 1 Consultation & Detailed Quote We discuss your requirements and provide a transparent quote.
step 2 Design & Planning For Your Approval Custom designs are created to match your vision and specifications.
step 3 Fabrication & Craftsmanship Our expert welders and fabricators bring the design to life with precision.
step 4 Installation & Completion Delivered and installed with care for a perfect fit guaranteeing you’re happy.
request a quote 02838 440029
Our Services Customized iron and steel production according to your specifications.
Customized Design Our team of experts will work with you to create a unique design that meets your specific production needs.
Efficient Production We use the latest technology and equipment to ensure efficient and high-quality production of your custom iron and steel products.
Strict Quality Control Our strict quality control measures ensure that your custom iron and steel products meet the highest standards of excellence and durability.
Our Reputable Clients At Mulhollands Contracts, we pride ourselves in providing our services to a diverse range of clients in industries such as construction, automotive, and many more.