woocommerce_before_trash_order

woocommerce_before_trash_order

Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_before_trash_order') is found 2 times:

  • /includes/data-stores/abstract-wc-order-data-store-cpt.php line 318
    				 *
    				 * @param int      $order_id ID of the order about to be trashed.
    				 * @param WC_Order $order    Instance of the order that is about to be trashed.
    				 */
    				do_action( 'woocommerce_before_trash_order', $id, $order );
    			}
    
    			wp_trash_post( $id );
    			$order->set_status( 'trash' );
    
    			if ( $do_filters ) {
    
  • /src/Internal/DataStores/Orders/OrdersTableDataStore.php line 2326
    				 *
    				 * @param int      $order_id ID of the order about to be trashed.
    				 * @param WC_Order $order    Instance of the order that is about to be trashed.
    				 */
    				do_action( 'woocommerce_before_trash_order', $order_id, $order );
    			}
    
    			$this->trash_order( $order );
    
    			if ( $do_filters ) {
    				/**