Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function remove_wpf_actions() {
- if ( ! function_exists( 'wp_fusion' ) ) {
- return;
- }
- remove_action( 'woocommerce_order_status_processing', array( wp_fusion()->integrations->woocommerce, 'woocommerce_apply_tags_checkout' ) );
- remove_action( 'woocommerce_order_status_completed', array( wp_fusion()->integrations->woocommerce, 'woocommerce_apply_tags_checkout' ) );
- }
- add_action( 'plugins_loaded', 'remove_wpf_actions' );
- function alt_wpf_checkout( $order_id ) {
- if ( ! function_exists( 'wp_fusion' ) ) {
- return;
- }
- if ( empty( wp_fusion()->batch->process ) ) {
- wp_fusion()->batch->includes();
- wp_fusion()->batch->init();
- }
- wp_fusion()->batch->process->push_to_queue( array( 'action' => 'wpf_woocommerce_async_checkout', 'args' => array( $order_id, true ) ) );
- wp_fusion()->batch->process->save()->dispatch();
- }
- add_action( 'woocommerce_order_status_processing', 'alt_wpf_checkout' );
- add_action( 'woocommerce_order_status_completed', 'alt_wpf_checkout' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement