BuddyDev

Search

[Resolved] Pay Per Post Publish Articles with the status “Awaiting”

  • Participant
    Level: Master
    Posts: 196
    Niculae Constantinescu on #50079

    Hi

    I am using BuddyBoss Theme and BuddyBoss Platform Pro

    Users can not pay and publish an article with the status “Awaiting”.

    These are the steps;

    1- A user add a new article
    2- He press the Publish button and arrives in the checkout page
    3- For some reasons he does not want to pay and give up the payment process and the article has the Status “Awaiting”.
    4- Later on he decide to pay and publish the “Awaiting” article.
    5- He enter the Edit article ( from the Awaiting Tab ) and click on the “Publish” button.
    6- But is not directed to the checkout Page, instead the article is just saved and updated.
    7- The article can not be payed and published anymore.

    The users should be able to pay and publish the articles with the status “Awaiting”.

    Thank you
    Cristi

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #50085

    Hi Cristi,
    Thank you.

    @ravisharma
    will be following up on it next week.

    Regards
    Brajesh

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2935
    Ravi on #50117

    Hello Cristi,

    I will look into this today and will update you at the day end.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2935
    Ravi on #50122

    Hello Cristi,

    I have checked and found that the plugin skips the redirect case if any order id associated with the post or post status is set to publish and the last one if the post product has already been added to the cart for proceeding.

    You can use the following code which will redirect users if the post product has already been added to the cart items.

    
    
    add_filter( 'bblpro_post_updated_redirect_url', function ( $redirect, $post_id, $form_id ) {
    
    	if ( ! function_exists( 'buddyblog_pay_per_post' ) || ! bbl_ppp_form_has_paid_posting_enabled( $form_id ) ) {
    		return $redirect;
    	}
    
    	if ( 'publish' == get_post_status( $post_id ) || bbl_ppp_get_post_order_id( $post_id ) ) {
    		return $redirect;
    	}
    
    	if ( get_post_meta( $post_id, '_bblpro_ppp_added', true ) ) {
    		$redirect = bbl_ppp_get_form_redirect_url( $form_id );
    	}
    
    	return $redirect;
    }, 10, 3 );
    
    

    Give it a try and let me know if helps or not.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 196
    Niculae Constantinescu on #50123

    Hi,

    I have tried.
    Unfortunately now the button “Publish” have no reaction at all.
    Basically I go to the Awaiting Tab enter the Edit Article then I click on Publish, and nothing happens.

    Cristi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2935
    Ravi on #50126
    This reply has been marked as private.
  • Participant
    Level: Master
    Posts: 196
    Niculae Constantinescu on #50129
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2935
    Ravi on #50132
    This reply has been marked as private.
  • Participant
    Level: Master
    Posts: 196
    Niculae Constantinescu on #50133
    This reply has been marked as private.
  • Participant
    Level: Master
    Posts: 196
    Niculae Constantinescu on #50140
    This reply has been marked as private.

The topic ‘ [Resolved] Pay Per Post Publish Articles with the status “Awaiting”’ is closed to new replies.

This topic is: resolved