Making changes to woocommerce order before save

A popular method is to hook to the order status. You have several status names to choose from: completed processing cancelled on-hold You would use it like this: add_action(‘woocommerce_order_status_processing’ In addition you can intercept a certain change like this: add_action(‘woocommerce_order_status_on-hold_to_completed’ Finally you can intercept any change that takes place like this: add_action(‘woocommerce_order_status_changed’

Undeletable posts, users or other content

When I see behavior like this, it’s almost always a corrupt MySQL table or two. You can activate WordPress’s built-in repair tool by adding define( ‘WP_ALLOW_REPAIR’, true ); to your wp-config.php file and visiting {$your_site}/wp-admin/maint/repair.php You can remove the define after you’re done.