PluginProbe
PhastPress / 3.6
PhastPress v3.6
3.12 3.11 1.75 1.76 1.77 1.78 1.79 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.90 1.91 1.92 1.93 1.94 1.95 1.96 1.97 All 119 releases
phastpress / classes / Compat / Ajax.php

Ajax.php in PhastPress 3.6, at classes/Compat/Ajax.php

33 lines 831 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Kibo\PhastPlugins\PhastPress\Compat;
3
4 class Ajax {
5 const ACTIONS = [
6 'yith_load_product_quick_view',
7 'flatsome_quickview',
8 ];
9
10 public function setup() {
11 if ((
12 defined('DOING_AJAX')
13 && DOING_AJAX
14 && defined('WP_ADMIN')
15 && WP_ADMIN
16 && isset($_REQUEST['action'])
17 && in_array($_REQUEST['action'], self::ACTIONS, true)
18 ) || (
19 isset($_GET['wc-ajax'])
20 && in_array($_GET['wc-ajax'], self::ACTIONS, true)
21 && class_exists(\WC_AJAX::class)
22 )) {
23 add_action('init', function () {
24 phastpress_get_plugin_sdk()->getPhastAPI()->deployOutputBufferForSnippets();
25 });
26
27 return true;
28 }
29
30 return false;
31 }
32 }
33