How can I find out what items a user has purchased? [closed]

Query the table wp_wpsc_purchase_logs, it contains all information about previous purchases. add this to your themes functions.php: /********************************************************* Get purchased articles by user_id or for the current user *********************************************************/ function haet_recently_bought_articles($user_id=0){ if($user_id==0) $user_id=get_current_user_id(); //only if there is an active user, otherwise we would get all purchased items from unregistered users if($user_id>0) { global $wpdb; $sql … Read more

post_content sanitization / transformation process

In reading through the function, I do not see anything that inherently transforms it. I’m relatively certain that there are no transforms (except maybe autop) until the display of the data. I would recommend trying one or two posts, making sure that it’s going to insert correctly, and then going all out. Also, depending on … Read more

Style Differently Edited Posts

This is very similar to @mrwweb’s answer, but a little bit more fleshed out. We’re also not going to overload taxonomies in order to get our post class, but do what you wanted initially: use a custom meta box. There is a built in template tag called post_class. Like almost every other function in WordPress … Read more

Update a users role based on number of posts published

current_user_can() checks for a capability, eg: edit_posts, not a role. The only capabilities subscribers have is read which only gives them access to the dashboard to change their profile (unless you added additional caps). They can’t even publish a post so you will have to start with contributors. $old_role = get_user_meta( $user_id, ‘wp_capabilities’ ); elseif … Read more

Email entire post contents

You can have a look on the following plugin for this purpose: http://wordpress.org/extend/plugins/wp-email/ For this plugin to work, your localhost WordPress web server need to connect your SMTP server for sending email. Follow the instruction on the link below to install the plugin: http://wordpress.org/extend/plugins/wp-email/installation/ Cheers.