It’s not Gravity Forms, it’s ob_end_clean()
, which just deletes the buffer and returns a boolean value. (In this case, true
, which is getting expressed as 1
.)
Is there a pressing reason to use the ob_*
functions? The code would be more readable (and predictable) if it was something like this.
public function collectGFData($entry, $form ) {
error_log("form was submitted");
error_log("entry was " . print_r( $entry. 1) );
error_log("form was " . print_r( $form, 1 ) );
$formID = rgar( $entry, 'form_id' );
$dateCreated = rgar( $entry, 'date_created' );
error_log("date created testing was " . print_r( $dateCreated, 1 ) );
error_log("form id testing was " . print_r( $formID, 1 ) );
}
…using print_r()
instead of var_dump()
.
Related Posts:
- Can an action callback prevent the parent from continuing execution?
- How can I trigger actions manually?
- Update media library image shown in “attachment details” when using wp_insert_attachment to add item to the media library
- add_action reference a class
- Remove parent theme action in child
- How to do_action and get a return value?
- Remove an action from an external Class
- Does the event ‘wp_version_check’ even exist? What is it doing?
- Unable to prevent function using save_post firing twice
- Difference between do_action(‘admin_enqueue_scripts’, $hook_suffix) and do_action(“admin_print_styles-$hook_suffix”) syntax
- Why, Where, and When to use reference pointers in filters/hooks?
- Add a Custom Field in Comment Box AFTER text area BUT BEFORE Send button
- Using wp_insert_post and post_update_meta but need to fire save_post afterward
- enqueuing React script and hooking its target div fails to load script
- Having an add_action( ‘user_new_form’,) [closed]
- Using auth_redirect returns cannot modify header information
- What would cause the ‘wp’ action to fire twice per page (but only once per post) in Firefox only?
- Problem:Save Several Duplicate posts in The Database and then Error nesting level of ‘100’ reached
- How to remove an action added by a child theme of Genesis
- wp_get_attachment_metadata returns false with add_action() ‘add_attachment’ hook
- Manually add admin bar
- How can I invoke an action after a CiviCRM triggering event?
- Remove action from a plugin class
- how can I use add_action with external class which the function contain 2 argument?
- remove_action not working with procedural function
- Why Should We Use wp_clear_scheduled_hook and What it Does?
- Woocommerce Change placement with wrapper
- Which action fire in front-end single post only
- Unable to show error message using wp_login action
- array of objects to do_action, callback gets singular object?
- where is the documentation for add_action() parameters?
- How to set a different value in the generator meta tag?
- how can I use add_action run another function when publishing new post?
- Call add_action() in function wordpress
- How to remove function?
- Validate form in functions.php, send errors back to template
- What is the callback sent to add_submenu_page() invoked by WordPress?
- How to track post number on the_loop
- Add meta field after post has been published
- $GLOBALS[‘hook_suffix’] variable empty
- publish_post action hook not working
- add_action() in switch statement
- Problem with get_the_excerpt when using an add_action(‘the_content’) containing script tags
- Gutenberg – Dispatch action or setAttributes() on Post Save/Update action instead of onChange listener
- Shortcodes — Using add_action, add_filter in the shortcode
- Using Nested add_action()
- WordPress action admin_post for non-admin authenticated users – Form submission
- Instantiating classes through add_action and saving them to user_meta data [closed]
- Are the hooks in the dashboard such as “load-$page_slug$” and “admin-head-$page_slug$” reliable and consistent throughout installs?
- Is there way to run a code every time when any cron is run?
- Remove Action from Plugin within extended class and no assigned variable
- add_action and do_action
- How to call a static function in add_action() inside another static function?
- Add “add to cart” button in WooCommerce [closed]
- Generate payment URL in custom email [closed]
- Why is my css and js not enqueued until footer?
- Why does my delete_post hook get called twice
- Which hook to add action on specific page?
- Action Scheduler not running
- W3TC manual cache flush does not work
- Run a function on all posts
- Adding php to form action breaks code [closed]
- Remove an action added within a class in a WordPress plugin
- add_action.. will work if function is empty?
- call custom action after delete account
- Dynamic name of cron event
- Trying to write a function in an external php file to manage admin menu visibility
- remove_action: Initial attempt failed while a later attempt worked
- Action inside another action not working
- register_post_type not working in wordpress 3.6
- How to use add_action inside files included by theme’s functions.php
- What do I put in the form action attr on top of form wordpress
- WordPress sent multiple requests on update
- do_action in API call
- Add Tag to post after publishing
- How do I dequeue js/css at the last possible moment?
- Custom query_var to get URL paramater not working
- do_action doesn’t trigger if it’s in a template that gets loaded via REST endpoint
- add_action where function has arguments
- Add Action wp_update_post not Updating WYSWIAG editor
- wpdb->insert creates duplicate rows
- Remove action from plugin
- remove action from woocommerce file
- Need data from two different actions
- Understanding and using did_action() in a conditional statement
- Adding a conditional to work on certain pages/page templates to an add_action()
- Why is this require statement not working?
- Adapting functions from Genesis theme
- Cannot Schedule Sending An Email
- Adding add_action function
- XML Imported Custom Posts
- Invoke a function before the action hook
- using media_handle_sideload() to add mp4 files to Media Library
- save_post action not firing when save
- OOP – add_action
- do_action in header, add action later?
- How to enable/disable a hook with theme options
- Passing arguments in add_action inside search template
- save post running twice and creating two database entries – how do I disable this?
- remove an action hook function on a plugin from a theme