Skip to content

Commit

Permalink
Merge pull request #131 from wpswings/v4.3.7
Browse files Browse the repository at this point in the history
V4.3.7
  • Loading branch information
mohammaddanish-cedcoss authored May 1, 2024
2 parents 6d5089d + 2143968 commit 76b2f5f
Show file tree
Hide file tree
Showing 17 changed files with 573 additions and 569 deletions.
2 changes: 1 addition & 1 deletion admin/class-woo-refund-and-exchange-lite-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ public function wps_rma_refund_amount() {
}
wps_rma_update_meta_data( $order_id, 'wps_rma_left_amount_done', 'yes' );
}
echo json_encode( $response );
echo wp_json_encode( $response );
wp_die();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public function wps_rma_general_setting_extend_set( $wps_rma_settings_general )
'id' => 'wps_rma_guest_form',
'value' => '[Wps_Rma_Guest_Form]',
'attr' => 'readonly',
'placeholder' => 'Shortcode',
'class' => 'mwr-select-class ' . $this->rma_pro_activate,
);
$wps_rma_settings_general[] = array(
Expand Down Expand Up @@ -690,12 +691,13 @@ public function wps_rma_wallet_settings_array_set( $wps_rma_settings_wallet ) {
'placeholder' => esc_html__( 'Please Enter the Wallet Coupon Prefix', 'woo-refund-and-exchange-lite' ),
),
array(
'title' => esc_html__( 'Wallet Shortcode', 'woo-refund-and-exchange-lite' ),
'type' => 'text',
'id' => 'wps_rma_wallet_shorcode',
'value' => '[Wps_Rma_Customer_Wallet]',
'attr' => 'readonly',
'class' => 'wrael-text-class ' . $this->rma_pro_activate,
'title' => esc_html__( 'Wallet Shortcode', 'woo-refund-and-exchange-lite' ),
'type' => 'text',
'id' => 'wps_rma_wallet_shorcode',
'value' => '[Wps_Rma_Customer_Wallet]',
'attr' => 'readonly',
'placeholder' => 'Shortcode',
'class' => 'wrael-text-class ' . $this->rma_pro_activate,
),
array(
'type' => 'button',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<?php
return;
}
$secure_nonce = wp_create_nonce( 'wps-rma-dashboard-nonce' );
$id_nonce_verified = wp_verify_nonce( $secure_nonce, 'wps-rma-dashboard-nonce' );
if ( ! $id_nonce_verified ) {
wp_die( esc_html__( 'Nonce Not verified', 'woo-refund-and-exchange-lite' ) );
}
global $wrael_wps_rma_obj;
$wrael_active_tab = isset( $_GET['wrael_tab'] ) ? sanitize_key( $_GET['wrael_tab'] ) : 'woo-refund-and-exchange-lite-general';
$wrael_default_tabs = $wrael_wps_rma_obj->wps_rma_plug_default_tabs();
Expand Down
4 changes: 2 additions & 2 deletions common/class-woo-refund-and-exchange-lite-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function wps_rma_order_return_attach_files() {
if ( isset( $_FILES['wps_rma_return_request_files']['tmp_name'][ $i ] ) ) {
$directory = ABSPATH . 'wp-content/attachment';
if ( ! file_exists( $directory ) ) {
mkdir( $directory, 0755, true );
wp_mkdir_p( $directory, 0755, true );
}

$file_name = isset( $_FILES['wps_rma_return_request_files']['name'][ $i ] ) ? sanitize_text_field( wp_unslash( $_FILES['wps_rma_return_request_files']['name'][ $i ] ) ) : '';
Expand All @@ -144,7 +144,7 @@ public function wps_rma_order_return_attach_files() {
$target_path = $directory . '/' . $order_id . '-' . sanitize_file_name( $file_name );

$filename[] = $order_id . '-' . sanitize_file_name( $file_name );
move_uploaded_file( $source_path, $target_path );
copy( $source_path, $target_path );
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion emails/class-wps-rma-order-messages-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
* @extends \WC_Email
*/
class Wps_Rma_Order_Messages_Email extends WC_Email {
/**
* $order as order id.
*
* @var string
*/
public $order_id = '';
/**
* Set email defaults
*
Expand All @@ -24,7 +30,7 @@ class Wps_Rma_Order_Messages_Email extends WC_Email {
public function __construct() {
// set ID, this simply needs to be a unique name.
$this->id = 'wps_rma_order_messages_email';

$this->recipient = '';
// this is the title in WooCommerce Email settings.
$this->title = 'RMA Order Messages';

Expand Down
14 changes: 13 additions & 1 deletion emails/class-wps-rma-refund-request-accept-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
* @extends \WC_Email
*/
class Wps_Rma_Refund_Request_Accept_Email extends WC_Email {
/**
* Undocumented variable
*
* @var string
*/
public $name = '';
/**
* Undocumented variable
*
* @var string
*/
public $order_id = '';
/**
* Set email defaults
*
Expand All @@ -24,7 +36,7 @@ class Wps_Rma_Refund_Request_Accept_Email extends WC_Email {
public function __construct() {
// set ID, this simply needs to be a unique name.
$this->id = 'wps_rma_refund_request_accept_email';

$this->recipient = '';
// this is the title in WooCommerce Email settings.
$this->title = 'RMA Refund Request Accept Email';
$this->name = '';
Expand Down
8 changes: 7 additions & 1 deletion emails/class-wps-rma-refund-request-cancel-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
* @extends \WC_Email
*/
class Wps_Rma_Refund_Request_Cancel_Email extends WC_Email {
/**
* Undocumented variable
*
* @var string
*/
public $order_id = '';
/**
* Set email defaults
*
Expand All @@ -24,7 +30,7 @@ class Wps_Rma_Refund_Request_Cancel_Email extends WC_Email {
public function __construct() {
// set ID, this simply needs to be a unique name.
$this->id = 'wps_rma_refund_request_cancel_email';

$this->recipient = '';
// this is the title in WooCommerce Email settings.
$this->title = 'RMA Refund Request Cancel Email';
// this is the description in WooCommerce email settings.
Expand Down
14 changes: 13 additions & 1 deletion emails/class-wps-rma-refund-request-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
* @extends \WC_Email
*/
class Wps_Rma_Refund_Request_Email extends WC_Email {
/**
* Undocumented variable
*
* @var string
*/
public $order_id = '';
/**
* Undocumented variable
*
* @var string
*/
public $to = '';
/**
* Set email defaults
*
Expand All @@ -24,7 +36,7 @@ class Wps_Rma_Refund_Request_Email extends WC_Email {
public function __construct() {
// set ID, this simply needs to be a unique name.
$this->id = 'wps_rma_refund_request_email';

$this->recipient = '';
// this is the title in WooCommerce Email settings.
$this->title = 'RMA Refund Request Email';
// this is the description in WooCommerce email settings.
Expand Down
28 changes: 14 additions & 14 deletions includes/class-woo-refund-and-exchange-lite-onboarding-steps.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public function wps_rma_add_on_boarding_form_fields() {
* Email field with label. ( auto filled with admin email )
*/

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-monthly-revenue',
'title' => esc_html__( 'What is your monthly revenue?', 'woo-refund-and-exchange-lite' ),
'type' => 'radio',
Expand All @@ -315,7 +315,7 @@ public function wps_rma_add_on_boarding_form_fields() {
),
),

rand() => array(
wp_rand() => array(
'id' => 'wps_rma_industry_type',
'title' => esc_html__( 'What industry defines your business?', 'woo-refund-and-exchange-lite' ),
'type' => 'select',
Expand Down Expand Up @@ -352,7 +352,7 @@ public function wps_rma_add_on_boarding_form_fields() {
),
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-onboard-email',
'title' => esc_html__( 'What is the best email address to contact you?', 'woo-refund-and-exchange-lite' ),
'type' => 'email',
Expand All @@ -364,7 +364,7 @@ public function wps_rma_add_on_boarding_form_fields() {
'class' => 'wrael-text-class',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-onboard-number',
'title' => esc_html__( 'What is your contact number?', 'woo-refund-and-exchange-lite' ),
'type' => 'text',
Expand All @@ -376,7 +376,7 @@ public function wps_rma_add_on_boarding_form_fields() {
'class' => '',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-store-name',
'title' => '',
'description' => '',
Expand All @@ -388,7 +388,7 @@ public function wps_rma_add_on_boarding_form_fields() {
'class' => '',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-store-url',
'title' => '',
'description' => '',
Expand All @@ -400,7 +400,7 @@ public function wps_rma_add_on_boarding_form_fields() {
'class' => '',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-show-counter',
'title' => '',
'description' => '',
Expand All @@ -412,7 +412,7 @@ public function wps_rma_add_on_boarding_form_fields() {
'class' => '',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-plugin-name',
'title' => '',
'description' => '',
Expand Down Expand Up @@ -459,7 +459,7 @@ public function wps_rma_add_deactivation_form_fields() {
* Email field with label. ( auto filled with admin email )
*/

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-deactivation-reason',
'title' => '',
'description' => '',
Expand All @@ -480,7 +480,7 @@ public function wps_rma_add_deactivation_form_fields() {
),
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-deactivation-reason-text',
'title' => esc_html__( 'Let us know why you are deactivating WooCommerce Refund and Exchange Lite so we can improve the plugin', 'woo-refund-and-exchange-lite' ),
'type' => 'textarea',
Expand All @@ -492,7 +492,7 @@ public function wps_rma_add_deactivation_form_fields() {
'class' => 'wps-keep-hidden',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-admin-email',
'title' => '',
'description' => '',
Expand All @@ -504,7 +504,7 @@ public function wps_rma_add_deactivation_form_fields() {
'class' => '',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-store-name',
'title' => '',
'description' => '',
Expand All @@ -516,7 +516,7 @@ public function wps_rma_add_deactivation_form_fields() {
'class' => '',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-store-url',
'title' => '',
'description' => '',
Expand All @@ -528,7 +528,7 @@ public function wps_rma_add_deactivation_form_fields() {
'class' => '',
),

rand() => array(
wp_rand() => array(
'id' => 'wps-wrael-plugin-name',
'title' => '',
'description' => '',
Expand Down
12 changes: 6 additions & 6 deletions includes/class-woo-refund-and-exchange-lite.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __construct() {
$this->version = WOO_REFUND_AND_EXCHANGE_LITE_VERSION;
} else {

$this->version = '4.3.6';
$this->version = '4.3.7';
}

$this->plugin_name = 'return-refund-and-exchange-for-woocommerce';
Expand Down Expand Up @@ -436,6 +436,11 @@ public static function is_enbale_usage_tracking() {
*/
public function wps_rma_plug_default_tabs() {
$wrael_default_tabs = array();
$wrael_default_tabs['woo-refund-and-exchange-lite-overview'] = array(
'title' => esc_html__( 'Overview', 'woo-refund-and-exchange-lite' ),
'name' => 'woo-refund-and-exchange-lite-overview',
'file_path' => WOO_REFUND_AND_EXCHANGE_LITE_DIR_PATH . 'admin/partials/woo-refund-and-exchange-lite-overview.php',
);
$wrael_default_tabs['woo-refund-and-exchange-lite-general'] = array(
'title' => esc_html__( 'General', 'woo-refund-and-exchange-lite' ),
'name' => 'woo-refund-and-exchange-lite-general',
Expand Down Expand Up @@ -468,11 +473,6 @@ public function wps_rma_plug_default_tabs() {
'name' => 'woo-refund-and-exchange-lite-api',
'file_path' => WOO_REFUND_AND_EXCHANGE_LITE_DIR_PATH . 'admin/partials/woo-refund-and-exchange-lite-api.php',
);
$wrael_default_tabs['woo-refund-and-exchange-lite-overview'] = array(
'title' => esc_html__( 'Overview', 'woo-refund-and-exchange-lite' ),
'name' => 'woo-refund-and-exchange-lite-overview',
'file_path' => WOO_REFUND_AND_EXCHANGE_LITE_DIR_PATH . 'admin/partials/woo-refund-and-exchange-lite-overview.php',
);
$wrael_default_tabs = apply_filters( 'wps_rma_plugin_standard_admin_settings_tabs', $wrael_default_tabs );
return $wrael_default_tabs;
}
Expand Down
Loading

0 comments on commit 76b2f5f

Please sign in to comment.