Tagged: Buddyblog Pro Pay Per Post
Thanks Ravi,
After updating the plugin the (publish-post) page crashed, but i was eventually able to isolate the problem to the code you sent before. I think the code is not compatible with the latest pay per post update.
/** * Enable BuddyBlog dropdown submission type. */ add_action( 'bblpro_form_after_form_fields', function ( $form_id, $post ) { if ( ! bblpro_ppp_is_form_pay_per_post_enabled( $form_id ) || $post->post_status == 'published' ) { return; } $submission_type = get_post_meta( $post->ID, '_bblpro_submission_type', true ); ?> <div class="bbl-form-field-container bbl-form-field-type-submission-type-container"> <div class="bbl-form-field bbl-form-field-select"> <label for="bbl_custom_field" class="bbl-field-label bbl-field-label-type-select"><?php esc_html_e( 'Submission Type', 'sb-buddyblog-custom' ); ?></label> <select name="bblpro-post-submission-type" id="bblpro-tax-selectbox-submission-type" class="postform"> <option value="free" <?php selected( $submission_type, 'free' ) ?>><?php esc_html_e( 'Free Post' ); ?></option> <option value="sponsored" <?php selected( $submission_type, 'sponsored' ) ?>><?php esc_html_e( '30 Days | Sponsored Post - ₦50,000' ); ?></option> </select> </div> </div> <?php }, 10, 2 ); add_action( 'bblpro_post_submitted', function ( $post_id, $form_id, $post_data ) { if ( ! bblpro_ppp_is_form_pay_per_post_enabled( $form_id ) ) { return; } if ( isset( $_POST['bblpro-post-submission-type'] ) && 'free' == $_POST['bblpro-post-submission-type'] ) { update_post_meta( $post_id, '_bblpro_submission_type', sanitize_text_field( $_POST['bblpro-post-submission-type'] ) ); add_filter( 'bblpro_ppp_skip_post_purchase', '__return_true' ); } }, 9, 3 );
Hello Brajesh,
I would like to add to my former suggestion pending when you are about to update the plugin.
NEW ADDITIONAL SUGGESTION
Kindly see the screenshot below for adding promote button to activity updates
FORMER SUGGESTIONS
https://ibb.co/jhqnK8D
https://ibb.co/s1QYtJWThanks
Is it possible to send email on post expiration.
EXAMPLES
1. Your sponsored post has expired. (EMAIL SUBJECT)
Hello {post_author|get_user_display_name},
Your Post titled ‘{post_title}’ has expired and is no longer sponsored..
If this post is still relevant, you can log in to {site_url} and renew this post as featured.2. Your expired Post has been renewed and published. (EMAIL SUBJECT)
Hello {post_author|get_user_display_name},
Your post titled ‘{post_title}’ has been renewed and is visible on site again.
To view your post you can use the link below:
{$post.ID|get_permalink}Hello Ravi,
Can multiple products be assigned for different pricing
PRODUCT A – 7 DAYS SPONSORED POST PRICED AT $25
PRODUCT B – 30 DAYS SPONSORED POST PRICED AT $100
PRODUCT C – 60 DAYS SPONSORED POST PRICED AT $180SUBMISSION TYPE WILL NOW HAVE 4 DROPDOWN OPTIONS
1. FREE POST
2. 7 DAYS SPONSORED POST – $25
3. 30 DAYS SPONSORED POST – $100
4. 60 DAYS SPONSORED POST PRICED AT $180Hi Tosin,
Thank you for the question.This has been our plan for future. The current release is going to include email options for post expiration.
Multiple product will come in next 6-8 weeks after the initial release.
Regards
BrajeshHi,
I updated the Pay Per Post to the V3 and also BuddyBoss 2 Theme and Platform Pro.
My issue is that after I edit an already payd and published post it direct me to the Checkout Page.
It should not do this.Also I have this code in my function.php file and it does not work with BuddyBlog Pro.
// remove old items in cart when new items added woocommerce
add_filter(‘woocommerce_add_to_cart_validation’, ‘remove_cart_item_before_add_to_cart’, 1, 3);
function remove_cart_item_before_add_to_cart($passed, $product_id, $quantity) {
if (!WC()->cart->is_empty()) {
WC()->cart->empty_cart();
}Thank you
Cristireturn $passed;
}
The topic ‘ [Resolved] Pay Per Post by selling access with WooCommerce’ is closed to new replies.