これは少し奇妙です。「update_post_meta」を使用して、Wordpress のカスタム フィールドを更新しています。update_post_meta($post_id, 'Test_Field', 'Test Value'); を実行すると カスタムフィールドは問題なく更新されますが、文字列値を使用すると更新されません:
$test_value = "Test";
echo $test_value; // No problem here
echo $post_id; // No problem here
update_post_meta($post_id, 'Test_Field', $test_value);
ご協力ありがとうございました
ストゥ