Viewing 1 replies (of 1 total)
  • Plugin Author BuddyBoss

    (@buddyboss)

    @hasanfachrul,
    The fix has been committed to the BP Portfolio plugin. the next bugfix release will include this.

    Meanwhile, you should be able to work around the issue by adding following code in your theme’s functions.php

    
    /**
     * Handle project delete
     */
    function bpcp_process_delete_project() {
    
     if ( isset( $_POST['target_project'] ) &&  isset( $_POST['delete_yes'] ) && 'Delete' == $_POST['delete_yes'] ) {
    
     $target_project = $_POST['target_project'];
    
     $deleted_project = wp_delete_post($target_project);
    
     if ($deleted_project) {
    
                bp_core_add_message(__('Project deleted successfully', 'bp-portfolio'), 'success');
    
     // now redirect to the members > username > portfolio
     $base_link = bpcp_portfolio_component_root();
                bp_core_redirect($base_link);
            }
        }
    }
    
    add_action( 'bp_actions', 'bpcp_process_delete_project' );
Viewing 1 replies (of 1 total)
  • The topic ‘Can’t delete the project’ is closed to new replies.