• Resolved Rodolfo Melogli

    (@businessbloomer)


    Hello Jamie, hope you’re well!

    Just so you know (I’m sure you’re already working on this), the “Duplicate Order” link does not show on hover any longer with the above version.

    Let me know when this is fixed, and thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Rodolfo Melogli

    (@businessbloomer)

    I think I figured out ??

    It might save you some time!

    Open file wc-duplicate-order.php and on line 78 add this:

    // ----------------
    // Business Bloomer Patch
    // ----------------
    	
    add_filter( 'woocommerce_admin_order_actions', 'clone_order_cta_new', 100, 2 );
    	
    function clone_order_cta_new( $actions, $order ) {
    		
    	$order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
    	
    	$url = admin_url( 'edit.php?post_type=shop_order&order_id=' . $order_id );
    		
    	$copy_link = wp_nonce_url( add_query_arg( array( 'duplicate' => 'init' ), $url ), 'duplicate_order_nonce', 'duplicate-order-nonce' );
    		
    	$actions['duplicate'] = array(
    		'url'       => $copy_link,
    		'name'      => __( 'Duplicate', 'woocommerce' ),
    		'action'    => "view duplicate", // keep "view" class for a clean button CSS
    	);
    	    
    	return $actions;
    				
    }
    	
    add_action( 'admin_head', 'add_custom_order_status_actions_button_css' );
    	
    function add_custom_order_status_actions_button_css() {
    	echo '<style>.view.duplicate::after { font-family: WooCommerce !important; content: "\e007" !important; }</style>';
    }

    Hope this helps!

    Rodolfo

    Thread Starter Rodolfo Melogli

    (@businessbloomer)

    Plugin Author Jamie Gill

    (@patchgill)

    Hey Rodolfo!

    I am well thanks hope you are too dude.

    Thanks for posting a solution whilst I got round to this much appreciated. A bit maxed out with actual recently so only just getting round to my hobbies again!

    I will put up a fix soon.

    Cheers
    J

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not working with Woo 3.3.1’ is closed to new replies.