У меня не работает обработка php на woocomerce. Я добавил php код в хэдер, но при нажатии на кнопку ничего не работает, что не так?
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package kadence
*/
namespace Kadence;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
//мой код
if(isset($_POST['woocommerce_checkout_place_order'])) {
echo "asdas";
}
?>
<!doctype html>
<html <?php language_attributes(); ?> class="no-js" <?php kadence()->print_microdata( 'html' ); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php
/**
* Kadence before wrapper hook.
*/
do_action( 'kadence_before_wrapper' );
?>
<div id="wrapper" class="site wp-site-blocks">
<?php
/**
* Kadence before header hook.
*
* @hooked kadence_do_skip_to_content_link - 2
*/
do_action( 'kadence_before_header' );
/**
* Kadence header hook.
*
* @hooked Kadence/header_markup - 10
*/
do_action( 'kadence_header' );
do_action( 'kadence_after_header' );
?>
<div id="inner-wrap" class="wrap hfeed kt-clear">
<?php
/**
* Hook for top of inner wrap.
*/
do_action( 'kadence_before_content' );
?>