警告:action_woocommerce_before_single_product()の引数2がない、/home/crskin/domains/cre8skin.lt/public_html/wp-includes/class-wp-hook.phpの298行で呼び出され、 /home/crskin/domains/cre8skin.lt/public_html/wp-content/themes/purelyshopping-child/functions.php on line 43 テストWooCommerceフックを使用しているときのエラー
これをどのように解釈しますか?
私が持っているコードは次のとおりです。action_woocommerce_before_single_product()
第二引数が欠落しています。
<?php
do_action('woocommerce_before_single_product');
function action_woocommerce_before_single_product($wc_print_notices, $int) {
echo ("test");
};
add_action ('woocommerce_before_single_product', 'action_woocommerce_before_single_product', 10, 2);
?>