| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
if ( ! defined( 'ABSPATH' ) ) : |
| 5 |
exit; |
| 6 |
endif; |
| 7 |
|
| 8 |
if ( ! class_exists( 'RSVP_Upsells' ) ) { |
| 9 |
|
| 10 |
class RSVP_Upsells { |
| 11 |
|
| 12 |
/** |
| 13 |
* Holds the class object. |
| 14 |
* |
| 15 |
* @since 2.7.2 |
| 16 |
* |
| 17 |
* @var object |
| 18 |
*/ |
| 19 |
public static $instance; |
| 20 |
|
| 21 |
/** |
| 22 |
* RSVP_Upsells constructor. |
| 23 |
* |
| 24 |
* @since 2.7.2 |
| 25 |
*/ |
| 26 |
function __construct() { |
| 27 |
add_action( 'rsvp_events_before_table', array( $this, 'events_table_upsells' ) ); |
| 28 |
add_action( 'rsvp_settings_page', array( $this, 'settings_upsells' ) ); |
| 29 |
add_action( 'rsvp_after_question_table', array( $this, 'questions_upsells' ) ); |
| 30 |
add_action( 'rsvp_after_add_guest', array( $this, 'add_guest_upsells' ) ); |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* Returns the singleton instance of the class. |
| 35 |
* |
| 36 |
* @return object The RSVP_Upsells object. |
| 37 |
* @since 2.7.2 |
| 38 |
*/ |
| 39 |
public static function get_instance() { |
| 40 |
|
| 41 |
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof RSVP_Upsells ) ) { |
| 42 |
self::$instance = new RSVP_Upsells(); |
| 43 |
} |
| 44 |
|
| 45 |
return self::$instance; |
| 46 |
|
| 47 |
} |
| 48 |
|
| 49 |
/** |
| 50 |
* Events table upsells |
| 51 |
* |
| 52 |
* @since 2.7.2 |
| 53 |
*/ |
| 54 |
public function events_table_upsells() { |
| 55 |
|
| 56 |
?> |
| 57 |
<div class="rsvp-upsell rsvp-center-text"> |
| 58 |
<h3><?php echo esc_html__( 'Looking for more events and customizations?', 'rsvp-plugin' ); ?></h3> |
| 59 |
<p class="rsvp-upsell-description"><?php echo esc_html__( 'RSVP Pro comes with a robust list of features, such as:', 'rsvp-plugin' ); ?></p> |
| 60 |
<ul class="rsvp-upsell-description"> |
| 61 |
<li> |
| 62 |
<?php esc_html_e( 'Multiple Events', 'rsvp-plugin' ); ?> |
| 63 |
</li> |
| 64 |
<li> |
| 65 |
<?php esc_html_e( 'Multiple Sub-events', 'rsvp-plugin' ); ?> |
| 66 |
</li> |
| 67 |
<li> |
| 68 |
<?php esc_html_e( 'Recurring events', 'rsvp-plugin' ); ?> |
| 69 |
</li> |
| 70 |
<li> |
| 71 |
<?php esc_html_e( 'Multiple custom questions / event', 'rsvp-plugin' ); ?> |
| 72 |
</li> |
| 73 |
<li> |
| 74 |
<?php esc_html_e( 'Attendees / event', 'rsvp-plugin' ); ?> |
| 75 |
</li> |
| 76 |
</ul> |
| 77 |
<p class="rsvp-upsell-description"> |
| 78 |
<?php esc_html_e( ' Upgrade to the premium version to edit your events with an opening and closing date, limit the number of participants and much much more...', 'rsvp-plugin' ); ?> |
| 79 |
<p> |
| 80 |
<a target="_blank" |
| 81 |
href="https://rsvpproplugin.com/features/" |
| 82 |
class="button"><?php echo esc_html__( 'See PRO Features', 'rsvp-plugin' ); ?></a><a |
| 83 |
target="_blank" |
| 84 |
href="https://rsvpproplugin.com/" |
| 85 |
class="button-primary button"><?php echo esc_html__( 'Get RSVP PRO!', 'rsvp-plugin' ); ?></a> |
| 86 |
</p> |
| 87 |
</div> |
| 88 |
<?php |
| 89 |
|
| 90 |
} |
| 91 |
|
| 92 |
/** |
| 93 |
* Events table upsells |
| 94 |
* |
| 95 |
* @since 2.7.2 |
| 96 |
*/ |
| 97 |
public function settings_upsells() { |
| 98 |
|
| 99 |
?> |
| 100 |
<div class="rsvp-upsell"> |
| 101 |
<h3><?php echo esc_html__( 'Customize all', 'rsvp-plugin' ); ?></h3> |
| 102 |
<p class="rsvp-upsell-description"><?php echo esc_html__( 'Everything here is customizable - from events, number of attendees, lists to texts, buttons, titles, and much more. With RSVP Pro, you can customize each slice of your form.', 'rsvp-plugin' ); ?></p> |
| 103 |
<p> |
| 104 |
<a target="_blank" |
| 105 |
href="https://rsvpproplugin.com/features/" |
| 106 |
class="button"><?php echo esc_html__( 'See PRO Features', 'rsvp-plugin' ); ?></a><a |
| 107 |
target="_blank" |
| 108 |
href="https://rsvpproplugin.com/" |
| 109 |
class="button-primary button"><?php echo esc_html__( 'Get RSVP PRO!', 'rsvp-plugin' ); ?></a> |
| 110 |
</p> |
| 111 |
</div> |
| 112 |
<?php |
| 113 |
|
| 114 |
} |
| 115 |
|
| 116 |
/** |
| 117 |
* Events table upsells |
| 118 |
* |
| 119 |
* @since 2.7.2 |
| 120 |
*/ |
| 121 |
public function questions_upsells() { |
| 122 |
|
| 123 |
?> |
| 124 |
<div class="rsvp-upsell"> |
| 125 |
<h3><?php echo esc_html__( 'Want to add questions for each event?', 'rsvp-plugin' ); ?></h3> |
| 126 |
<p class="rsvp-upsell-description"><?php echo esc_html__( 'Do you want to add custom questions for a specific event? Upgrade to RSVP Pro and find out more necessary info about your guests. ', 'rsvp-plugin' ); ?></p> |
| 127 |
<p> |
| 128 |
<a target="_blank" |
| 129 |
href="https://rsvpproplugin.com/features/" |
| 130 |
class="button"><?php echo esc_html__( 'See PRO Features', 'rsvp-plugin' ); ?></a><a |
| 131 |
target="_blank" |
| 132 |
href="https://rsvpproplugin.com/" |
| 133 |
class="button-primary button"><?php echo esc_html__( 'Get RSVP PRO!', 'rsvp-plugin' ); ?></a> |
| 134 |
</p> |
| 135 |
</div> |
| 136 |
<?php |
| 137 |
|
| 138 |
} |
| 139 |
|
| 140 |
/** |
| 141 |
* Events table upsells |
| 142 |
* |
| 143 |
* @since 2.7.2 |
| 144 |
*/ |
| 145 |
public function add_guest_upsells() { |
| 146 |
|
| 147 |
?> |
| 148 |
<div class="rsvp-upsell"> |
| 149 |
<h3><?php echo esc_html__( 'Separate attendees for each event', 'rsvp-plugin' ); ?></h3> |
| 150 |
<p class="rsvp-upsell-description"><?php echo esc_html__( 'If you want to keep in touch with your guests, upgrade to RSVP Pro to send messages, reset attendees’ responses, and add as many participants as you please. You can also increase your workflow by creating reminders and automated emails. |
| 151 |
', 'rsvp-plugin' ); ?></p> |
| 152 |
<p class="rsvp-upsell-description"><?php echo esc_html__( 'We know how important it is to keep everything stored in a safe place, so we made everything easy for you to import and export attendees and events data.', 'rsvp-plugin' ); ?></p> |
| 153 |
<p> |
| 154 |
<a target="_blank" |
| 155 |
href="https://rsvpproplugin.com/features/" |
| 156 |
class="button"><?php echo esc_html__( 'See PRO Features', 'rsvp-plugin' ); ?></a><a |
| 157 |
target="_blank" |
| 158 |
href="https://rsvpproplugin.com/" |
| 159 |
class="button-primary button"><?php echo esc_html__( 'Get RSVP PRO!', 'rsvp-plugin' ); ?></a> |
| 160 |
</p> |
| 161 |
</div> |
| 162 |
<?php |
| 163 |
|
| 164 |
} |
| 165 |
|
| 166 |
} |
| 167 |
|
| 168 |
} |