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
CristiHi Cristi,
Thank you.
@ravisharma will be following up on it next week.Regards
BrajeshHello 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
RaviHi,
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
The topic ‘ [Resolved] Pay Per Post Publish Articles with the status “Awaiting”’ is closed to new replies.