Skip to content
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

The registered batch processes are not showing in the admin panel #122

Open
evgrezanov opened this issue Aug 29, 2017 · 2 comments
Open

Comments

@evgrezanov
Copy link

Hi here!
After activated plugin and register batch processes in functions.php at child theme it not showing at dashboard.
batch processes wordpress - google chrome
Also, in Google Chrome console i see warning
Warning: Failed propType: Invalid prop batches of type array supplied to BatchPicker, expected object. Check the render method of App.
r @ batch.min.js:1

@jjeaton
Copy link
Contributor

jjeaton commented Aug 29, 2017

@evgrezanov can you share the code for the batch process registration you're using in functions.php?

@evgrezanov
Copy link
Author

@jjeaton sure, i used code from examples
`function my_batch_process() {
register_batch_process( array(
'name' => 'Products SEO set Batch',
'type' => 'product',
'callback' => 'my_callback_function',
'args' => array(
'posts_per_page' => 10,
'post_type' => 'post'
)
) );
}
add_action( 'locomotive_init', 'my_batch_process' );

/**

  • This is what we want to do with each individual result during a batch routine
  • @param array $result Individual result from batch query.
    */
    function my_callback_function( $result ) {
    error_log( print_r( $result->post_title, true ) );
    }`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants