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_review_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_review_settings( $request ) { // check if its a valid request. $data = $request->get_params(); if ( isset( $data['action'] ) && ( 'maybe-later' === $data['action'] || 'hide-forever' === $data['action'] ) ) { update_option( '_uncanny_automator_review_reminder', $data['action'] ); update_option( '_uncanny_automator_review_reminder_date', current_time( 'timestamp' ) ); 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. |