Skip to content

Commit 5652a7c

Browse files
OlegApanovichcagdasdag
authored andcommitted
VC-3543 remove pnps survey
1 parent 1dc54ee commit 5652a7c

File tree

4 files changed

+1
-233
lines changed

4 files changed

+1
-233
lines changed

public/components/popup/popupContainer.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React, { useState, useEffect, useCallback } from 'react'
22
import { Dispatch } from 'redux' // eslint-disable-line
33
import classNames from 'classnames'
44
import { getStorage } from 'vc-cake'
5-
import VotePopup from './popups/votePopup'
65
import PremiumPromoPopup from './popups/premiumPromoPopup'
76
import PricingPopup from './popups/pricingPopup'
87
import { connect } from 'react-redux'
@@ -62,9 +61,7 @@ const PopupContainer = ({ activePopup, allPopupsHidden, isPopupVisible, popupVis
6261

6362
let activePopupHtml = null
6463

65-
if (activePopup === 'votePopup') {
66-
activePopupHtml = <VotePopup {...popupProps} />
67-
} else if (activePopup === 'premiumPromoPopup') {
64+
if (activePopup === 'premiumPromoPopup') {
6865
activePopupHtml = <PremiumPromoPopup {...popupProps} />
6966
} else if (activePopup === 'pricingPopup') {
7067
activePopupHtml = <PricingPopup {...popupProps} />

public/components/popup/popups/votePopup.tsx

Lines changed: 0 additions & 154 deletions
This file was deleted.

visualcomposer/Helpers/Popups.php

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,8 @@
1515
*/
1616
class Popups implements Helper
1717
{
18-
protected static $showFeedbackPopupCache;
19-
2018
protected static $showPremiumPromoPopupCache;
2119

22-
/**
23-
* It a score from 1-10 rating popup survey.
24-
*
25-
* @note The survey should show up to all users: free and premium.
26-
* @note The survey should show up to users who previously submitted answers to our previous surveys version.
27-
* @note The survey should appear to the user after 5 days after activation.
28-
*
29-
* @return bool
30-
*/
31-
public function showFeedbackPopup()
32-
{
33-
if (!is_null(self::$showFeedbackPopupCache)) {
34-
return self::$showFeedbackPopupCache;
35-
}
36-
37-
$user = wp_get_current_user();
38-
39-
if (empty($user->ID)) {
40-
return self::$showFeedbackPopupCache;
41-
}
42-
43-
$optionsHelper = vchelper('Options');
44-
$result = false;
45-
// do only if feedback not sent previously
46-
47-
if (!get_user_meta($user->ID, 'vcv-feedback-score', true)) {
48-
// Actively used for more then 5 days
49-
$isActivelyUsed = vchelper('Plugin')->isActivelyUsed();
50-
// System check is OK
51-
$systemStatusFailing = $optionsHelper->get('systemCheckFailing', false);
52-
// Have at least 3 posts with VCWB
53-
$foundPostsOk = vchelper('Plugin')->isHasCertainPostsNumber();
54-
55-
$result = $isActivelyUsed && !$systemStatusFailing && $foundPostsOk;
56-
}
57-
58-
self::$showFeedbackPopupCache = $result;
59-
60-
return self::$showFeedbackPopupCache;
61-
}
62-
6320
public function showPremiumPromoPopup()
6421
{
6522
if (!is_null(self::$showPremiumPromoPopupCache)) {
@@ -75,14 +32,6 @@ public function showPremiumPromoPopup()
7532
return self::$showPremiumPromoPopupCache;
7633
}
7734

78-
// 3 days delay if feedback popup is closed
79-
// 14 days delay after free license activated
80-
$showFeedbackPopup = $this->showFeedbackPopup();
81-
if ($showFeedbackPopup) {
82-
self::$showPremiumPromoPopupCache = $result;
83-
return self::$showPremiumPromoPopupCache;
84-
}
85-
8635
// Only if false (so it is not yet shown or already sent)
8736
$user = wp_get_current_user();
8837
if (!empty($user->ID)) {

visualcomposer/Modules/License/FeedbackController.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ class FeedbackController extends Container implements Module
3232
*/
3333
public function __construct()
3434
{
35-
$this->addFilter('vcv:ajax:vote:score:feedback:submit:adminNonce', 'submitScoreVote');
36-
37-
$this->addFilter('vcv:ajax:review:survey:submit:adminNonce', 'submitReviewSurvey');
38-
3935
$this->addFilter(
4036
'vcv:ajax:license:deactivation:submit:adminNonce',
4137
'deactivationSubmitForm'
@@ -46,8 +42,6 @@ public function __construct()
4642
'activationSurveySubmitForm'
4743
);
4844

49-
$this->addFilter('vcv:editor:variables', 'addVariables');
50-
5145
$file = plugin_basename(VCV_PLUGIN_FULL_PATH);
5246
$this->wpAddAction('deactivate_' . $file, 'setDeactivationPopupInterval');
5347
}
@@ -220,24 +214,6 @@ protected function activationSurveySubmitForm(Request $requestHelper, Url $urlHe
220214
return ['status' => true];
221215
}
222216

223-
/**
224-
* @param $variables
225-
* @param $payload
226-
* @param \VisualComposer\Helpers\Popups $popupsHelper
227-
*
228-
* @return array
229-
*/
230-
protected function addVariables($variables, $payload, Popups $popupsHelper)
231-
{
232-
$variables[] = [
233-
'key' => 'VCV_SHOW_FEEDBACK_FORM',
234-
'value' => $popupsHelper->showFeedbackPopup(),
235-
'type' => 'constant',
236-
];
237-
238-
return $variables;
239-
}
240-
241217
/**
242218
* Set time interval for deactivation feedback popup
243219
*/

0 commit comments

Comments
 (0)