• Resolved lucianowp

    (@lucianowp)


    Hello, thanks for your plugin.

    Do you think is possible in addition to deleting the account to delete the order data if that option is active under ‘WooCommerce > Settings > Accounts & Privacy > Remove personal data from orders’ ?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sanjeev Aryal

    (@sanzeeb3)

    Hi @lucianowp,

    Currently, I’d think the personal data from the order won’t be automatically deleted. You can do something like this in your theme’s functions.php?

    add_action( 'wp_frontend_delete_account_process_complete', function( $user ) {
    
    	if ( ! defined( 'WC_VERSION' ) ) {
    		return;
    	}
    
    	WC_Privacy_Erasers::order_data_eraser( $user->user_email, -1 );
    });

    This is with or without that option being checked. I haven’t tested though.

    Thread Starter lucianowp

    (@lucianowp)

    Hi @sanzeeb3!

    I tried your snippet and worked out of the box, you are great.

    I think that is an interesting feature to add as a checkbox.

    Thanks for your help and quick replay!

    Plugin Author Sanjeev Aryal

    (@sanzeeb3)

    Great to hear that! I’ll make a note to review this feature.

    Have a good one! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Delete Personal Data from orders’ is closed to new replies.