Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shameemreza/86d02835d7adf5314d0770cd5b627bae to your computer and use it in GitHub Desktop.
Save shameemreza/86d02835d7adf5314d0770cd5b627bae to your computer and use it in GitHub Desktop.
AutomateWoo Custom Function action with Variable.
function my_function_name() {
$workflow = AutomateWoo\Workflows::get_current();
if ( $workflow ) {
$customer_id = $workflow->data_layer()->get_customer_id();
// Now you can use $customer_id in your function
}
}
add_action( 'automatewoo/custom_functions', 'my_function_name' );
@shameemreza
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment