Support » Plugin: Contact Form 7 » Shortcode contact fom 7 does not work

  • I tried to integrate a shortcode with information obtained by $_POST, without any information when sending the email. What may be happening?

    https://i.stack.imgur.com/muDX9.jpg

    add_shortcode('cs7', 'cs7');
    add_filter('wpcf7_posted_data', 'cs7',10, 1);
    function cs7( $output) {
      $content = $_POST;
      for($i=1; $i < $content['itemCount'] + 1; $i++) {
      $quantity =  'item_quantity_'.$i;
      $name = 'item_name_'.$i;
      $output = $content[$quantity]. ' ' . $content[$name];
      return $output;
      }
    }
  • You must be logged in to reply to this topic.