woocommerce_product_object_trashable
woocommerce_product_object_trashable
Appears in: woocommerce.10.9.3, woocommerce.10.9.4
Hook Type: filter
Displaying hooks found in version: woocommerce.10.9.4apply_filters('woocommerce_product_object_trashable') is found 1 times:
- /src/Internal/Abilities/Domain/ProductDelete.php line 102
* @param \WC_Product $product The product being considered for trashing. * * @since 10.9.0 */ $supports_trash = apply_filters( 'woocommerce_product_object_trashable', EMPTY_TRASH_DAYS > 0, $product ); if ( ! $force && ! $supports_trash ) { return new \WP_Error( 'woocommerce_trash_not_supported', __( 'Trash is disabled on this site. Pass force: true to permanently delete.', 'woocommerce' ), array( 'status' => 501 )