Skip to content

Commit

Permalink
v4.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivamddeveloper committed Nov 27, 2023
1 parent 747965e commit 9c3d950
Show file tree
Hide file tree
Showing 32 changed files with 456 additions and 499 deletions.
7 changes: 1 addition & 6 deletions admin/class-woo-refund-and-exchange-lite-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public function __construct( $plugin_name, $version ) {
}
$this->plugin_name = $plugin_name;
$this->version = $version;

}

/**
Expand Down Expand Up @@ -436,7 +435,7 @@ public function wrael_admin_general_settings_page( $wrael_settings_general ) {
'to' => 'wps_rma_time_duration_to',
'from' => 'wps_rma_time_duration_from',
'class' => 'wrael-number-class',
'description' => esc_html__( 'Enter a valid time period, For Example:-', 'woo-refund-and-exchange-lite' ) . ' 4:00 AM - 8:30 AM, 8:00 AM - 12 PM, 2:30 PM - 6:30 PM' ,
'description' => esc_html__( 'Enter a valid time period, For Example:-', 'woo-refund-and-exchange-lite' ) . ' 4:00 AM - 8:30 AM, 8:00 AM - 12 PM, 2:30 PM - 6:30 PM',
);
$wrael_settings_general =
// To extend the general setting.
Expand Down Expand Up @@ -1156,7 +1155,6 @@ public function wps_rma_general_setting_extend( $wps_rma_settings_general ) {
public function wps_rma_refund_setting_extend( $wps_rma_settings_refund ) {
$setting_obj = new Wps_Rma_Settings_Extend();
return $setting_obj->wps_rma_refund_setting_extend_set( $wps_rma_settings_refund );

}

/**
Expand All @@ -1167,7 +1165,6 @@ public function wps_rma_refund_setting_extend( $wps_rma_settings_refund ) {
public function wps_rma_refund_appearance_setting_extend( $refund_app_setting_extend ) {
$setting_obj = new Wps_Rma_Settings_Extend();
return $setting_obj->wps_rma_refund_appearance_setting_extend_set( $refund_app_setting_extend );

}

/**
Expand All @@ -1188,7 +1185,6 @@ public function wps_rma_exchange_settings_array( $wps_rma_settings_exchange ) {
public function wps_rma_cancel_settings_array( $wps_rma_settings_cancel ) {
$setting_obj = new Wps_Rma_Settings_Extend();
return $setting_obj->wps_rma_cancel_settings_array_set( $wps_rma_settings_cancel );

}

/**
Expand All @@ -1209,7 +1205,6 @@ public function wps_rma_wallet_settings_array( $wps_rma_settings_wallet ) {
public function wps_rma_order_message_setting_extend( $cancel_setting_array ) {
$setting_obj = new Wps_Rma_Settings_Extend();
return $setting_obj->wps_rma_order_message_setting_extend_set( $cancel_setting_array );

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
$attachment = array();
$customer_email = WC()->mailer()->emails['wps_rma_refund_request_cancel_email'];
$customer_email->trigger( $message, $attachment, $order_obj->get_billing_email(), $order_id );

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
<h6>
<?php
/* translators: %s: search term */
echo sprintf( esc_html__( 'To Configure Cancel Related Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_html( $rma_pro_activate ) . '" href="' . esc_html( $woo_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Cancel Related Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_html( $rma_pro_activate ) . '" href="' . esc_html( $woo_email_url ) . '">Click Here</a>' );
?>
</h6>
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@
<h6>
<?php
/* translators: %s: link */
echo sprintf( esc_html__( 'To Configure Exchange Request Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_html( $rma_pro_activate ) . '" href="' . esc_html( $woo_request_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Exchange Request Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_html( $rma_pro_activate ) . '" href="' . esc_html( $woo_request_email_url ) . '">Click Here</a>' );
?>
</h6>
<h6>
<?php
/* translators: %s: link */
echo sprintf( esc_html__( 'To Configure Exchange Request Accept Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_html( $rma_pro_activate ) . '" href="' . esc_html( $woo_accept_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Exchange Request Accept Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_html( $rma_pro_activate ) . '" href="' . esc_html( $woo_accept_email_url ) . '">Click Here</a>' );
?>
</h6>
<h6>
<?php
/* translators: %s: link */
echo sprintf( esc_html__( 'To Configure Exchange Request Cancel Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_html( $rma_pro_activate ) . '" href="' . esc_html( $woo_cancel_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Exchange Request Cancel Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_html( $rma_pro_activate ) . '" href="' . esc_html( $woo_cancel_email_url ) . '">Click Here</a>' );
?>
</h6>
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<?php
$woo_email_url = admin_url() . 'admin.php?page=wc-settings&tab=email&section=wps_rma_returnship_email';
/* translators: %s: search term */
echo sprintf( esc_html__( 'To Configure Returnship Related Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_attr( $rma_pro_activate ) . '" href="' . esc_html( $woo_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Returnship Related Email %s.', 'woo-refund-and-exchange-lite' ), '<a class="button_' . esc_attr( $rma_pro_activate ) . '" href="' . esc_html( $woo_email_url ) . '">Click Here</a>' );
?>
</h6>
<p class="submit">
Expand Down Expand Up @@ -509,7 +509,7 @@
<?php
$woo_shiprocket_url = 'https://app.shiprocket.in/api-user';
/* translators: %s: search term */
echo sprintf( esc_html__( 'To Get Api Details For Shiprocket %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_shiprocket_url ) . '" target="_blank">Click Here</a> Shiprocket Dashboard' );
printf( esc_html__( 'To Get Api Details For Shiprocket %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_shiprocket_url ) . '" target="_blank">Click Here</a> Shiprocket Dashboard' );
?>
</h6>
<br>
Expand Down Expand Up @@ -541,7 +541,7 @@
<?php
$woo_shiprocket_channel_url = 'https://app.shiprocket.in/seller/channels';
/* translators: %s: search term */
echo sprintf( esc_html__( 'To Get Channel Details Form Shiprocket %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_shiprocket_channel_url ) . '" target="_blank">Click Here</a> Shiprocket Dashboard' );
printf( esc_html__( 'To Get Channel Details Form Shiprocket %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_shiprocket_channel_url ) . '" target="_blank">Click Here</a> Shiprocket Dashboard' );
?>
</h6>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
<h6>
<?php
/* translators: %s: search term */
echo sprintf( esc_html__( 'To Configure Order Message Email %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Order Message Email %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_email_url ) . '">Click Here</a>' );
?>
</h6>
6 changes: 3 additions & 3 deletions admin/partials/woo-refund-and-exchange-lite-refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
<h6>
<?php
/* translators: %s: link */
echo sprintf( esc_html__( 'To Configure Refund Request Email %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_request_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Refund Request Email %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_request_email_url ) . '">Click Here</a>' );
?>
</h6>
<h6>
<?php
/* translators: %s: link */
echo sprintf( esc_html__( 'To Configure Refund Request Accept Email %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_accept_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Refund Request Accept Email %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_accept_email_url ) . '">Click Here</a>' );
?>
</h6>
<h6>
<?php
/* translators: %s: link */
echo sprintf( esc_html__( 'To Configure Refund Request Cancel Email %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_cancel_email_url ) . '">Click Here</a>' );
printf( esc_html__( 'To Configure Refund Request Cancel Email %s.', 'woo-refund-and-exchange-lite' ), '<a href="' . esc_html( $woo_cancel_email_url ) . '">Click Here</a>' );
?>
</h6>
1 change: 0 additions & 1 deletion common/class-woo-refund-and-exchange-lite-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ public function wps_rma_plugin_on_create_blog( $new_site ) {
update_option( 'wps_rma_plugin_standard_multistep_done', 'yes' );
restore_current_blog();
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion emails/class-wps-rma-order-messages-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function __construct() {
$this->order_id = '';
// Call parent constructor to load any other defaults not explicity defined here.
parent::__construct();

}

/**
Expand Down
1 change: 0 additions & 1 deletion emails/class-wps-rma-refund-request-accept-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public function __construct() {
$this->order_id = '';
// Call parent constructor to load any other defaults not explicity defined here.
parent::__construct();

}

/**
Expand Down
1 change: 0 additions & 1 deletion emails/class-wps-rma-refund-request-cancel-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function __construct() {
$this->order_id = '';
// Call parent constructor to load any other defaults not explicity defined here.
parent::__construct();

}

/**
Expand Down
1 change: 0 additions & 1 deletion emails/class-wps-rma-refund-request-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function __construct() {
$this->to = '';
// Call parent constructor to load any other defaults not explicity defined here.
parent::__construct();

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
}

echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
}

echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
$admin_mail = get_option( 'woocommerce_email_from_address', get_option( 'admin_email' ) );
if ( $to === $admin_mail && ( ! empty( $additional_content ) || empty( $additional_content ) ) ) {
echo wp_kses_post( $message );
} else {
if ( isset( $additional_content ) && '' !== $additional_content ) {
} elseif ( isset( $additional_content ) && '' !== $additional_content ) {
echo wp_kses_post( $additional_content );
} else {
echo wp_kses_post( $message );
}
} else {
echo wp_kses_post( $message );
}

echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
8 changes: 3 additions & 5 deletions emails/templates/wps-rma-refund-request-email-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
$admin_mail = get_option( 'woocommerce_email_from_address', get_option( 'admin_email' ) );
if ( $to === $admin_mail && ( ! empty( $additional_content ) || empty( $additional_content ) ) ) {
echo wp_kses_post( $message );
} else {
if ( isset( $additional_content ) && '' !== $additional_content ) {
} elseif ( isset( $additional_content ) && '' !== $additional_content ) {
echo wp_kses_post( $additional_content );
} else {
echo wp_kses_post( $message );
}
} else {
echo wp_kses_post( $message );
}

do_action( 'woocommerce_email_footer', $email );
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,4 @@ public static function wps_rma_delete_pages() {
wp_delete_post( $page_id );
delete_option( 'wps_rma_view_order_msg_page_id' );
}

}
4 changes: 0 additions & 4 deletions includes/class-woo-refund-and-exchange-lite-i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,5 @@ public function load_plugin_textdomain() {
false,
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
);

}



}
4 changes: 0 additions & 4 deletions includes/class-woo-refund-and-exchange-lite-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function __construct() {

$this->actions = array();
$this->filters = array();

}

/**
Expand Down Expand Up @@ -101,7 +100,6 @@ private function add( $hooks, $hook, $component, $callback, $priority, $accepted
);

return $hooks;

}

/**
Expand All @@ -118,7 +116,5 @@ public function wrael_run() {
foreach ( $this->actions as $hook ) {
add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public function __construct() {
// Ajax to Skip popup.
add_action( 'wp_ajax_wrael_skip_onboarding_popup', array( $this, 'wps_rma_skip_onboarding_popup' ) );
add_action( 'wp_ajax_nopriv_wrael_skip_onboarding_popup', array( $this, 'wps_rma_skip_onboarding_popup' ) );

}

/**
Expand Down Expand Up @@ -600,7 +599,7 @@ public function wps_rma_send_onboarding_data() {
$found = current(
array_filter(
$formatted_data,
function( $item ) {
function ( $item ) {
return isset( $item['name'] ) && 'plugin_deactivation_reason' === $item['name'];
}
)
Expand Down
23 changes: 9 additions & 14 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.2.0';
$this->version = '4.3.3';
}

$this->plugin_name = 'return-refund-and-exchange-for-woocommerce';
Expand All @@ -92,7 +92,6 @@ public function __construct() {
$this->woo_refund_and_exchange_lite_common_hooks();

$this->woo_refund_and_exchange_lite_api_hooks();

}

/**
Expand All @@ -117,22 +116,22 @@ private function woo_refund_and_exchange_lite_dependencies() {
* The class responsible for orchestrating the actions and filters of the
* core plugin.
*/
include_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-woo-refund-and-exchange-lite-loader.php';
include_once plugin_dir_path( __DIR__ ) . 'includes/class-woo-refund-and-exchange-lite-loader.php';

/**
* The class responsible for defining internationalization functionality
* of the plugin.
*/
include_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-woo-refund-and-exchange-lite-i18n.php';
include_once plugin_dir_path( __DIR__ ) . 'includes/class-woo-refund-and-exchange-lite-i18n.php';

if ( is_admin() ) {

// The class responsible for defining all actions that occur in the admin area.
include_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-woo-refund-and-exchange-lite-admin.php';
include_once plugin_dir_path( __DIR__ ) . 'admin/class-woo-refund-and-exchange-lite-admin.php';

// The class responsible for on-boarding steps for plugin.
if ( is_dir( plugin_dir_path( dirname( __FILE__ ) ) . 'onboarding' ) && ! class_exists( 'Woo_Refund_And_Exchange_Lite_Onboarding_Steps' ) ) {
include_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-woo-refund-and-exchange-lite-onboarding-steps.php';
if ( is_dir( plugin_dir_path( __DIR__ ) . 'onboarding' ) && ! class_exists( 'Woo_Refund_And_Exchange_Lite_Onboarding_Steps' ) ) {
include_once plugin_dir_path( __DIR__ ) . 'includes/class-woo-refund-and-exchange-lite-onboarding-steps.php';
}

if ( class_exists( 'Woo_Refund_And_Exchange_Lite_Onboarding_Steps' ) ) {
Expand All @@ -141,20 +140,19 @@ private function woo_refund_and_exchange_lite_dependencies() {
} else {

// The class responsible for defining all actions that occur in the public-facing side of the site.
include_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-woo-refund-and-exchange-lite-public.php';
include_once plugin_dir_path( __DIR__ ) . 'public/class-woo-refund-and-exchange-lite-public.php';

}

include_once plugin_dir_path( dirname( __FILE__ ) ) . 'package/rest-api/class-woo-refund-and-exchange-lite-rest-api.php';
include_once plugin_dir_path( __DIR__ ) . 'package/rest-api/class-woo-refund-and-exchange-lite-rest-api.php';

/**
* This class responsible for defining common functionality
* of the plugin.
*/
include_once plugin_dir_path( dirname( __FILE__ ) ) . 'common/class-woo-refund-and-exchange-lite-common.php';
include_once plugin_dir_path( __DIR__ ) . 'common/class-woo-refund-and-exchange-lite-common.php';

$this->loader = new Woo_Refund_And_Exchange_Lite_Loader();

}

/**
Expand All @@ -170,7 +168,6 @@ private function woo_refund_and_exchange_lite_locale() {
$plugin_i18n = new Woo_Refund_And_Exchange_Lite_I18n();

$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );

}

/**
Expand Down Expand Up @@ -357,7 +354,6 @@ private function woo_refund_and_exchange_lite_public_hooks() {

// template include.
$this->loader->add_filter( 'template_include', $wrael_plugin_public, 'wps_rma_product_return_template' );

}

/**
Expand All @@ -369,7 +365,6 @@ private function woo_refund_and_exchange_lite_public_hooks() {
private function woo_refund_and_exchange_lite_api_hooks() {
$wrael_plugin_api = new Woo_Refund_And_Exchange_Lite_Rest_Api( $this->wrael_get_plugin_name(), $this->wrael_get_version() );
$this->loader->add_action( 'rest_api_init', $wrael_plugin_api, 'wps_rma_add_endpoint' );

}


Expand Down
2 changes: 1 addition & 1 deletion includes/woo-refund-and-exchange-lite-common-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function wps_rma_show_buttons( $func, $order ) {
if ( 'on' === get_option( 'wps_rma_return_time_policy' ) ) {
$wps_rma_from_time = get_option( 'wps_rma_time_duration_from', false );
$wps_rma_to_time = get_option( 'wps_rma_time_duration_to', false );
if ( $wps_rma_from_time && $wps_rma_to_time && strtotime( current_time('h:i A') ) < strtotime( $wps_rma_from_time ) || strtotime( current_time('h:i A') ) > strtotime( $wps_rma_to_time ) ) {
if ( $wps_rma_from_time && $wps_rma_to_time && strtotime( current_time( 'h:i A' ) ) < strtotime( $wps_rma_from_time ) || strtotime( current_time( 'h:i A' ) ) > strtotime( $wps_rma_to_time ) ) {
$show_button = ucfirst( $func ) . esc_html__( 'is not available right now', 'woocommerce-rma-for-return-refund-and-exchange' );
}
}
Expand Down
Binary file modified languages/woo-refund-and-exchange-lite-en_US.mo
Binary file not shown.
Loading

0 comments on commit 9c3d950

Please sign in to comment.