wp-staging / wp-staging-hooks

Plugin for adding extra functionality to the WordPress plugin WP STAGING
5 stars 2 forks source link

wpstg_execute_after_cloning syntax #4

Closed Tsjippy closed 2 years ago

Tsjippy commented 3 years ago

WHat is the correct syntax? I found two potentials:

add_action( 'wpstg_clone_action_staging', array($this, 'wpstg_execute_after_cloning' ), 10); add_action( 'wpstg.clone_first_run', array($this, 'wpstg_execute_after_cloning' ), 10);

Both don't seem to work I tested with this:

function wpstg_execute_after_cloning() { error_log("test1"); }

rene-hermenau commented 3 years ago

Hi, both are correct but the first one is deprecated and it’s recommended to use the first one.

It seems you find an issue if this does not work. We are checking this and will release an update for it then.

Thank you for the heads up.

René