Created
June 27, 2024 04:33
-
-
Save shameemreza/86d02835d7adf5314d0770cd5b627bae to your computer and use it in GitHub Desktop.
AutomateWoo Custom Function action with Variable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my_function_name
is the name you would enter in the "Function Name" field in AutomateWoo.