Hi Masanari,
Thank you for waiting, while I performed some tests on my website.
To test the "cred_commerce_after_order_completed" hook, I attached a simple function that updates the "Tagline" option, at WP Admin -> Settings -> General.
( screenshot: hidden link )
add_action( 'cred_commerce_after_order_completed', 'my_hook_custom_action', 10, 1 );
function my_hook_custom_action( $data ) {
// update the "Tagline" option in the General settings
update_option( 'blogdescription ', 'some text');
}
Note: the above code was added into the active theme's "functions.php" file.
I created a post form to add a new custom post in "Draft" status and set the form to have the exact same settings, like the one on your website.
A product was also attached to the form so that it automatically gets added to the cart and visitor is redirected to the checkout page, after the form is submitted.
As I submitted the form and completed the checkout, a new post was added in draft status and order was also generated in the "Processing" state.
Once, I completed the order manually from the order edit screen, the "Tagline" option was automatically updated with the "some text", confirming that the hooked function fired successfully.
Also, the status of the connected post also updated to "Published".
To troubleshoot why this isn't working on your website, I'll recommend testing this with all extra plugins disabled ( other than the Toolset and WooCommerce ) and also with a default theme like Twenty Nineteen. This will help in narrowing down to a possible conflicting plugin or custom code.
Please also test the hooked function, by adding it directly in the active theme's "functions.php" file and not through "Dynamik > Custom > Functions". The way some themes or plugins include custom code can also affect the order or priority of hook execution.
I hope these points will help and please let me know if you need any further assistance around this.
regards,
Waqar