Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Paste this in your active theme's functions.php file.
- * @param \GeminiLabs\SiteReviews\Request $request
- * @return void
- */
- add_action('site-reviews/review/request', function ($request) {
- // This assumes that "surcharge" is the field name of the custom field.
- if ('Yes' === $request->get('surcharge')) {
- $request->set('assigned_posts', '13'); // Site Reviews category ID
- }
- if ('No' === $request->get('surcharge')) {
- $request->set('assigned_posts', '14'); // Site Reviews category ID
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement