php - Add custom functionality on WooCommerce complete button -
i've situation add data database tables on order status completed button.
i can see url in class-wc-admin-post-types.php
can me hook? or how admin-ajax.php works? have add status of mine custom database tables.
this code fire customer's order set completed..
add_action( 'woocommerce_order_status_completed', 'custom_task' ); function custom_task( $order_id ) { // continue if have $order_id if ( ! $order_id ) { return; } // order $order = wc_get_order( $order_id ); // thing }
Comments
Post a Comment