-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pending payment jobs not showing in the job dashboard #2127
Comments
Yes, could this please be prioritized? I reported this to WPJM support almost a year ago (in May 2020) and a separate issue about this was opened by another user in June 2020. Is anyone working on this? Can anyone? |
@Hastibe in case you need to show "pending_payment" jobs in your job dashboard you can use the following snippet: Just a work around, there should be native support for this though. |
@Gnodesign -- thanks so much for sharing this! The concern with this snippet to show "Pending Payment" jobs in the job dashboard is that it doesn't provide an obvious way for customers to resume submitting a pending payment job from the dashboard--when hovering over it in the dashboard, pending payment jobs just provide the option to "Edit" them or "Delete" them, instead of providing a "Continue Submission" option (like there is for "Draft" jobs), so that they can actually submit the pending payment jobs. Any chance that you (or someone else here) would be familiar with how to modify the snippet to provide an option like this for "Pending Payment" jobs shown on the jobs dashboard? |
The snippet I provided only adds the "Pending Payment" jobs in the job dashboard with no extra actions. You could add a "Continue Submission" action for these jobs via the snippet below: Hope this helps. :) |
Oh wow, this is terrific, @Gnodesign -- thank you so much! Are you using these snippets yourself? If so, any issues that have come up with them for you or employers? |
You are welcome @Hastibe ! :) Not really, I created this for customers that are using my theme (Cariera). I know that there are quite a few of them that are currently using the snippets on their live sites, there hasn't been any issues/reports so far. For now this is the best workaround, hopefully there will be native support for this at some point. |
I recommend using this code snippet instead, to have a function cariera_job_manager_my_job_actions( $actions, $job_id ) {
$job = get_post( $job_id );
$base_nonce_action_name = 'job_manager_my_job_actions';
if ( $job->post_status === 'pending_payment' ) {
$actions['continue_pending_payment'] = [
'label' => __( 'Continue Submission', 'wp-job-manager' ),
'nonce' => $base_nonce_action_name,
];
}
return $actions;
}
add_filter( 'job_manager_my_job_actions', 'cariera_job_manager_my_job_actions', 10, 2 );
add_action( 'job_manager_job_dashboard_do_action_continue_pending_payment', 'smyles_check_continue_pending_payment' );
function smyles_check_continue_pending_payment( $job_id ){
wp_update_post( [ 'ID' => $job_id, 'post_status' => 'draft' ] );
wp_safe_redirect( add_query_arg( [ 'job_id' => absint( $job_id ) ], job_manager_get_permalink( 'submit_job_form' ) ) );
exit;
} This will set the status back to |
Some work has started here. Adding this to the 1.36.0 milestone as one of the fixes for our next release. |
@onubrooks This has already been fixed with WCPL 2.9.5. |
Closing this since it has already been fixed with WCPL 2.9.5. Thanks for informing me @Gnodesign |
Describe the bug
Not sure if this should be handled via WC Paid Listings but since the Job Dashboard is handled by WPJM I will just submit this issue here.
If a user decides to leave the page during job submission while they are on the checkout page the job is saved as "pending_payment" in the backend but can not be shown in the job dashboard. This is confusing for users because they think the job never got saved and they have to refill everything again.
We can add the "pending_payment" status via the
'job_manager_get_dashboard_jobs_args'
filter but I think this would be a lot better if it were supported by the plugin to allow users to continue their submission as it happens with pending jobs (when the option is enabled).WP-Job-Manager/includes/class-wp-job-manager-shortcodes.php
Lines 268 to 277 in 5efcfd4
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Isolating the problem (mark completed items with an [x]):
WordPress Environment
The text was updated successfully, but these errors were encountered: