Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Automator_Review::save_tracking_settings( object $request )
Rest API callback for saving user selection for review.
Contents
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $request
(Required)
Return Return
(object)
Source Source
File: src/core/admin/class-automator-review.php
public function save_tracking_settings( $request ) { // check if its a valid request. $data = $request->get_params(); if ( isset( $data['action'] ) && 'tracking-settings' === $data['action'] ) { if( 'true' === $data['swtich'] ) { update_option( 'automator_reporting', true ); } else { delete_option( 'automator_reporting' ); } if( isset( $data['hide'] ) ) { update_option( '_uncanny_automator_tracking_reminder', 'hide-forever' ); } return new WP_REST_Response( [ 'success' => true ], 200 ); } return new WP_REST_Response( [ 'success' => false ], 200 ); }
Expand full source code Collapse full source code View on Github
Changelog Changelog
Version | Description |
---|---|
2.1.4 | Introduced. |