mirror of
https://github.com/proelements/proelements.git
synced 2026-04-05 20:13:47 +00:00
v3.35.0
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\Woocommerce\Traits;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use ElementorPro\core\utils\Hints;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
trait Send_App_Plg_Trait {
|
||||
public function maybe_add_send_app_promotion_control( $widget ): void {
|
||||
if ( Hints::is_plugin_installed( 'send-app' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$notice_id = 'send_app_wc_widgets_notice';
|
||||
if ( ! Hints::should_show_hint( $notice_id ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$notice_content = esc_html__( 'Built your store? Now make it grow. Start with Send today.', 'elementor-pro' );
|
||||
|
||||
$widget->add_control(
|
||||
'send_app_promo',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => Hints::get_notice_template( [
|
||||
'display' => ! Hints::is_dismissed( $notice_id ),
|
||||
'type' => 'info',
|
||||
'content' => $notice_content,
|
||||
'icon' => true,
|
||||
'dismissible' => $notice_id,
|
||||
'button_text' => __( 'Install Plugin', 'elementor-pro' ),
|
||||
'button_event' => $notice_id,
|
||||
'button_data' => [
|
||||
'action_url' => Hints::get_plugin_action_url( 'send-app' ),
|
||||
],
|
||||
], true ),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ use ElementorPro\Core\Utils;
|
||||
use ElementorPro\Core\Utils\Hints;
|
||||
use ElementorPro\Modules\QueryControl\Module;
|
||||
use ElementorPro\Modules\Woocommerce\Traits\Product_Id_Trait;
|
||||
use ElementorPro\Modules\Woocommerce\Traits\Send_App_Plg_Trait;
|
||||
use ElementorPro\Plugin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
@@ -18,7 +17,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
class Add_To_Cart extends Widget_Button {
|
||||
use Base_Widget_Trait;
|
||||
use Product_Id_Trait;
|
||||
use Send_App_Plg_Trait;
|
||||
|
||||
public function get_name() {
|
||||
return 'wc-add-to-cart';
|
||||
@@ -76,8 +74,6 @@ class Add_To_Cart extends Widget_Button {
|
||||
]
|
||||
);
|
||||
|
||||
$this->maybe_add_send_app_promotion_control( $this );
|
||||
|
||||
$this->add_control(
|
||||
'product_id',
|
||||
[
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
namespace ElementorPro\Modules\Woocommerce\Widgets;
|
||||
|
||||
use ElementorPro\Modules\Woocommerce\Module;
|
||||
use ElementorPro\Modules\Woocommerce\Traits\Send_App_Plg_Trait;
|
||||
use ElementorPro\Plugin;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Box_Shadow;
|
||||
@@ -19,7 +18,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
|
||||
class Cart extends Base_Widget {
|
||||
use Send_App_Plg_Trait;
|
||||
|
||||
public function get_name() {
|
||||
return 'woocommerce-cart';
|
||||
@@ -60,8 +58,6 @@ class Cart extends Base_Widget {
|
||||
]
|
||||
);
|
||||
|
||||
$this->maybe_add_send_app_promotion_control( $this );
|
||||
|
||||
$this->add_control(
|
||||
'cart_layout',
|
||||
[
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace ElementorPro\Modules\Woocommerce\Widgets;
|
||||
|
||||
use ElementorPro\Modules\Woocommerce\Traits\Send_App_Plg_Trait;
|
||||
use ElementorPro\Plugin;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Box_Shadow;
|
||||
@@ -17,7 +16,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
|
||||
class Checkout extends Base_Widget {
|
||||
use Send_App_Plg_Trait;
|
||||
private $reformatted_form_fields;
|
||||
|
||||
public function get_name() {
|
||||
@@ -64,8 +62,6 @@ class Checkout extends Base_Widget {
|
||||
]
|
||||
);
|
||||
|
||||
$this->maybe_add_send_app_promotion_control( $this );
|
||||
|
||||
$this->add_control(
|
||||
'checkout_layout',
|
||||
[
|
||||
|
||||
@@ -5,7 +5,6 @@ use Elementor\Controls_Manager;
|
||||
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use ElementorPro\Modules\Woocommerce\Traits\Send_App_Plg_Trait;
|
||||
use ElementorPro\Plugin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
@@ -13,7 +12,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
|
||||
class Product_Add_To_Cart extends Base_Widget {
|
||||
use Send_App_Plg_Trait;
|
||||
|
||||
public function get_name() {
|
||||
return 'woocommerce-product-add-to-cart';
|
||||
@@ -194,8 +192,6 @@ class Product_Add_To_Cart extends Base_Widget {
|
||||
]
|
||||
);
|
||||
|
||||
$this->maybe_add_send_app_promotion_control( $this );
|
||||
|
||||
$this->add_control(
|
||||
'layout',
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user