• Resolved Thijsonline

    (@thijsonline)


    As suggested in http://ww.wp.xz.cn/support/topic/adding-reviews-to-events I’ve added the WP Customer reviews to events and locations with the proposed workaround.

    However, now that I’m looking to remove them, I’ll need a similar workaround to disable the plugin from events and locations.

    Can this be achieved by altering the “Disable Plugin for all Existing Posts” code [below] and replacing ‘post’ with ‘event’ and then pressing the respective button in the admin interface?

    elseif ($this->p->Submit == 'Disable Plugin for all Existing Posts') {
    
                global $wpdb;
    
                $wpdb->query( "DELETE $wpdb->postmeta FROM $wpdb->postmeta
    
                                LEFT JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->postmeta.post_id 
    
                                WHERE $wpdb->posts.post_type = 'post' AND $wpdb->postmeta.meta_key = 'wpcr_enable' " );
    
            }

    Any thoughts on whether this is likely to work / screw up the site?

    https://ww.wp.xz.cn/plugins/events-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hiya,

    Can you clarify what you mean by “disable the plugin from events and locations” please?

    Thanks

    Thread Starter Thijsonline

    (@thijsonline)

    Good question. In the end I’m looking to remove all the data associated with the reviews of events and locations.

    Above question concerns the first step (I assumed), namely removing the wpcr_enable entry with regard to events and locations from the database.

    It’s difficult for us to comment on that code since it’s not directly related to Events Manager and is really to do with another plugin.

    That said, unless you have some reason to actually delete the data, it will be easier and less risky to just hide the review function and not worry about the removing the data.

    Thread Starter Thijsonline

    (@thijsonline)

    Ok, thanks. I’ll look into it elsewhere.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Removing "Review" metadata’ is closed to new replies.