Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/wc-place-order-without-payment/inc/Modules/PendingPaymentNotification.php
+++ b/wc-place-order-without-payment/inc/Modules/PendingPaymentNotification.php
@@ -0,0 +1,146 @@
+<?php
+namespace WPOWPModules;
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+/**
+ * Class PendingPaymentNotification
+ *
+ * @package WPOWPModules
+ * @since 1.0.0
+ */
+class PendingPaymentNotification extends WC_Email {
+
+ /**
+ * Construct
+ */
+ public function __construct() {
+ $this->id = 'wpowp_pending_payment_email';
+ $this->title = __( 'Pending Payment', 'wpowp' );
+ $this->description = __( 'This email is sent when an order status changes to pending payment.', 'wpowp' );
+ $this->template_html = 'emails/pending-payment-notification.php';
+ $this->template_plain = 'emails/plain/pending-payment-notification.php';
+ $this->template_base = WPOWP_DIR . 'templates/';
+ $this->customer_email = true;
+ $this->subject = __( 'Your Order #{order_number} Requires Payment', 'wpowp' );
+ $this->heading = __( 'Pay Now to Secure Your Order', 'wpowp' );
+
+ // Call parent constructor
+ parent::__construct();
+ }
+
+ /**
+ * Trigger
+ *
+ * @param integer $order_id
+ * @param object $order
+ *
+ * @return void
+ */
+ public function trigger( $order_id, $order = false ) {
+
+ if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
+ $order = wc_get_order( $order_id );
+ }
+
+ if ( is_a( $order, 'WC_Order' ) && $this->is_enabled() ) {
+
+ $this->object = $order;
+
+ $this->find[] = '{order_date}';
+ $this->replace[] = date_i18n( wc_date_format(), strtotime( $this->object->get_date_created() ) );
+
+ $this->find[] = '{order_number}';
+ $this->replace[] = $this->object->get_order_number();
+
+ $this->recipient = $this->object->get_billing_email();
+ $this->send( $this->recipient, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
+ }
+ }
+
+ /**
+ * Get content html.
+ *
+ * @return string
+ */
+ public function get_content_html() {
+ ob_start();
+ wc_get_template(
+ $this->template_html,
+ array(
+ 'order' => $this->object,
+ 'email_heading' => $this->get_heading(),
+ 'email' => $this,
+ 'additional_content' => $this->get_additional_content(),
+ 'sent_to_admin' => false,
+ 'plain_text' => false,
+ ),
+ $this->template_base,
+ $this->template_base
+ );
+ return ob_get_clean();
+ }
+
+ /**
+ * Get content plain.
+ *
+ * @return string
+ */
+ public function get_content_plain() {
+ ob_start();
+ wc_get_template(
+ $this->template_plain,
+ array(
+ 'order' => $this->object,
+ 'email_heading' => $this->get_heading(),
+ 'email' => $this,
+ 'sent_to_admin' => false,
+ 'plain_text' => true,
+ ),
+ $this->template_base,
+ $this->template_base
+ );
+ return ob_get_clean();
+ }
+
+ /**
+ * Initialise Settings Form Fields
+ */
+ public function init_form_fields() {
+ $this->form_fields = apply_filters(
+ 'wpowp_offline_form_fields',
+ array(
+ 'enabled' => array(
+ 'title' => __( 'Enable/Disable', 'wpowp' ),
+ 'type' => 'checkbox',
+ 'label' => __( 'Enable this email notification', 'wpowp' ),
+ 'default' => 'yes',
+ ),
+ 'subject' => array(
+ 'title' => __( 'Subject', 'wpowp' ),
+ 'type' => 'text',
+ 'description' => __( 'This controls the email subject line. Leave blank to use the default subject: "Your Order #{order_number} Requires Payment".', 'wpowp' ),
+ 'placeholder' => __( 'Your Order #{order_number} Requires Payment', 'wpowp' ),
+ 'default' => __( 'Your Order #{order_number} Requires Payment', 'wpowp' ),
+ ),
+ 'heading' => array(
+ 'title' => __( 'Email Heading', 'wpowp' ),
+ 'type' => 'text',
+ 'description' => __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: "Pay Now to Secure Your Order".', 'wpowp' ),
+ 'placeholder' => __( 'Pay Now to Secure Your Order', 'wpowp' ),
+ 'default' => __( 'Pay Now to Secure Your Order', 'wpowp' ),
+ ),
+ 'email_type' => array(
+ 'title' => __( 'Email type', 'wpowp' ),
+ 'type' => 'select',
+ 'description' => __( 'Choose which format of email to send.', 'wpowp' ),
+ 'default' => 'html',
+ 'class' => 'wc-enhanced-select',
+ 'options' => $this->get_email_type_options(),
+ ),
+ )
+ );
+ }
+}
--- a/wc-place-order-without-payment/inc/Modules/Rules.php
+++ b/wc-place-order-without-payment/inc/Modules/Rules.php
@@ -234,10 +234,14 @@
// Loop through each group of rules
foreach ( $saved_rules as $rule_group ) {
- $switch = array();
- $switch['placeOrderSwitch'] = $rule_group['placeOrderSwitch'];
- $switch['requestQuoteSwitch'] = $rule_group['requestQuoteSwitch'];
- $switch['orderApprovalSwitch'] = $rule_group['orderApprovalSwitch'];
+ $switch = array();
+ $switch['placeOrderSwitch'] = ( isset( $rule_group['placeOrderSwitch'] ) ) ? $rule_group['placeOrderSwitch'] : '';
+ $switch['requestQuoteSwitch'] = ( isset( $rule_group['requestQuoteSwitch'] ) ) ? $rule_group['requestQuoteSwitch'] : '';
+ $switch['orderButtonTextSwitch'] = ( isset( $rule_group['orderButtonTextSwitch'] ) ) ? $rule_group['orderButtonTextSwitch'] : '';
+ $switch['removeShippingFieldsRatesSwitch'] = ( isset( $rule_group['removeShippingFieldsRatesSwitch'] ) ) ? $rule_group['removeShippingFieldsRatesSwitch'] : '';
+ $switch['removeTaxRatesSwitch'] = ( isset( $rule_group['removeTaxRatesSwitch'] ) ) ? $rule_group['removeTaxRatesSwitch'] : '';
+ $switch['removeCheckoutPrivacySwitch'] = ( isset( $rule_group['removeCheckoutPrivacySwitch'] ) ) ? $rule_group['removeCheckoutPrivacySwitch'] : '';
+ $switch['removeCheckoutTermsSwitch'] = ( isset( $rule_group['removeCheckoutTermsSwitch'] ) ) ? $rule_group['removeCheckoutTermsSwitch'] : '';
$rules = $rule_group['rules'];
@@ -263,7 +267,7 @@
$condition = $rules[0]['condition'] ?? 'AND'; // Default condition
- foreach ( $rules as $index => $rule ) {
+ foreach ( $rules as $index => $rule ) { // phpcs:ignore
$item = $rule['item'];
$operator = $rule['operator'];
$value = $rule['value'];
--- a/wc-place-order-without-payment/inc/WPOWP_Admin.php
+++ b/wc-place-order-without-payment/inc/WPOWP_Admin.php
@@ -13,6 +13,7 @@
use WPOWPModulesRules as WPOWP_Rules;
use WPOWPHelper as WPOWP_Helper;
+use WPOWPModulesPendingPaymentNotification as WPOWP_PendingPaymentEmail;
if ( ! class_exists( 'WPOWP_Admin' ) ) {
class WPOWP_Admin {
@@ -41,6 +42,13 @@
// Admin Footer
add_filter( 'admin_footer_text', array( $this, 'replace_footer' ) );
add_filter( 'update_footer', array( $this, 'replace_version' ), 99 );
+
+ if ( wpowp_fs()->is_paying() ) {
+ // Add to WooCommerce Email Classes
+ add_filter( 'woocommerce_email_classes', array( $this, 'add_order_notification_email' ) );
+ // Trigger the custom email when order status changes to pending
+ add_action( 'woocommerce_order_status_changed', array( $this, 'send_order_notification' ), 10, 3 );
+ }
}
/**
@@ -53,8 +61,8 @@
add_menu_page( WPOWP_SHORT_NAME, WPOWP_SHORT_NAME, 'manage_options', WPOWP_PLUGIN_SLUG, array( $this, 'menu_settings' ), 'dashicons-store', 26 );
add_submenu_page(
'admin.php?page=wpowp-settings',
- __( WPOWP_SHORT_NAME, WPOWP_TEXT_DOMAIN ),
- __( WPOWP_SHORT_NAME, WPOWP_TEXT_DOMAIN ),
+ __( WPOWP_SHORT_NAME, 'wpowp' ),
+ __( WPOWP_SHORT_NAME, 'wpowp' ),
'manage_options',
'books-shortcode-ref',
'books_ref_page_callback'
@@ -71,19 +79,19 @@
$this->settings = array(
'skip_cart' => false,
'order_status' => 'processing', // Default order status after place order
- 'add_cart_text' => __( 'Buy Now', WPOWP_TEXT_DOMAIN ),
+ 'add_cart_text' => __( 'Buy Now', 'wpowp' ),
'free_product_on_cart' => false,
'free_product_on_checkout' => false,
'free_product' => false,
- 'free_product_text' => __( 'FREE', WPOWP_TEXT_DOMAIN ),
+ 'free_product_text' => __( 'FREE', 'wpowp' ),
'quote_only' => false,
'quote_button_postion' => 'after_submit',
- 'quote_button_text' => __( 'Qoute Only', WPOWP_TEXT_DOMAIN ),
+ 'quote_button_text' => __( 'Qoute Only', 'wpowp' ),
'remove_shipping' => false,
'remove_privacy_policy_text' => false,
'remove_checkout_terms_conditions' => false,
'standard_add_cart' => false,
- 'order_button_text' => __( 'Place Order', WPOWP_TEXT_DOMAIN ),
+ 'order_button_text' => __( 'Place Order', 'wpowp' ),
'hide_place_order_button' => false,
'remove_taxes' => false,
'enable_sitewide' => true,
@@ -149,6 +157,8 @@
/**
* Get settings
*
+ * @param string $setting_name
+ * @param boolean $skip_merge
* @return settings
* @since 2.3
*/
@@ -172,6 +182,9 @@
/**
* Set Option
*
+ * $param string $option_name
+ * $param string $option_value
+ *
* @return array
* @since 2.3
*/
@@ -222,7 +235,7 @@
'nonce' => wp_create_nonce( 'wp_rest' ),
'restApiBase' => get_rest_url() . 'wpowp-api/action/',
'labels' => array(
- 'add_rule' => __( 'Add Rule', WPOWP_TEXT_DOMAIN ),
+ 'add_rule' => __( 'Add Rule', 'wpowp' ),
'confirm_reset_text' => WPOWP_ADMIN_CONFIRM_RESET_TEXT,
),
'lists' => array(
@@ -249,17 +262,18 @@
/**
* Replace Footer
*
+ * @param string $text
* @return void
* @since 2.3
*/
public function replace_footer( $text ) {
if ( isset( $_GET['page'] ) && 'wpowp-settings' === sanitize_text_field( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
- $text = __( 'Like Place Order Without Payment? Give it a', WPOWP_TEXT_DOMAIN );
+ $text = __( 'Like Place Order Without Payment? Give it a', 'wpowp' );
$text .= ' <a target="_blank" rel="noopener noreferrer" href="https://wordpress.org/support/plugin/wc-place-order-without-payment/reviews/?rate=5#new-post">';
- $text .= __( '★★★★★', WPOWP_TEXT_DOMAIN ) . '</a>' . __( ' rating. A huge thanks in advance!', WPOWP_TEXT_DOMAIN );
+ $text .= __( '★★★★★', 'wpowp' ) . '</a>' . __( ' rating. A huge thanks in advance!', 'wpowp' );
}
return $text;
@@ -268,19 +282,48 @@
/**
* Replace Version
*
+ * @param string $text
* @return void
* @since 2.3
*/
public function replace_version( $text ) {
if ( isset( $_GET['page'] ) && 'wpowp-settings' === sanitize_text_field( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
- $text = __( 'Version ', WPOWP_TEXT_DOMAIN ) . WPOWP_VERSION;
+ $text = __( 'Version ', 'wpowp' ) . WPOWP_VERSION;
}
return $text;
}
- }
- WPOWP_Admin::get_instance();
+ /**
+ * Add the pending payment notification email class to the list of email classes.
+ *
+ * @param array $email_classes The list of email classes.
+ * @return array The updated list of email classes.
+ * @since 2.6.6
+ * @version 2.6.6
+ */
+ public function add_order_notification_email( $email_classes ) {
+ $email_classes['WPOWP_Pending_Payment_Email'] = new WPOWP_PendingPaymentEmail();
+ return $email_classes;
+ }
+
+ /**
+ * Send order notification when order status changes to pending, approved, rejected.
+ *
+ * @param int $order_id The ID of the order.
+ * @param string $old_status The old order status.
+ * @param string $new_status The new order status.
+ * @return void
+ * @since 2.6.6
+ */
+ public function send_order_notification( $order_id, $old_status, $new_status ) {
+ // Check if the new status is 'pending'
+ if ( $new_status === 'pending' ) {
+ $email = new WPOWP_PendingPaymentEmail();
+ $email->trigger( $order_id );
+ }
+ }
+ }
}
--- a/wc-place-order-without-payment/inc/WPOWP_Front.php
+++ b/wc-place-order-without-payment/inc/WPOWP_Front.php
@@ -43,7 +43,10 @@
*/
public function handle_front( $settings ) {
- if ( ! empty( $settings ) && is_array( $settings ) ) {
+ // Fetch Applicable Rules
+ $process_rules = wpowp_process_rules();
+
+ if ( ( ! empty( $settings ) && is_array( $settings ) ) || is_array( $process_rules ) ) {
$skip_cart = $settings['skip_cart'];
@@ -75,8 +78,8 @@
}
// Checkout Order button text
- if ( ! empty( $settings['order_button_text'] ) ) {
- // Add WC Order Button FilterI
+ if ( ( false === filter_var( $settings['standard_add_cart'], FILTER_VALIDATE_BOOLEAN ) && ! empty( $settings['order_button_text'] ) ) || ! empty( $process_rules['orderButtonTextSwitch'] ) ) {
+ // Add WC Order Button Filter
add_filter( 'woocommerce_order_button_text', array( $this, 'order_btntext' ) );
}
@@ -115,7 +118,7 @@
*/
public function cart_btntext() {
$add_cart_label = $this->settings['add_cart_text'];
- $add_cart_label = ( 'Buy Now' === trim( $add_cart_label ) ) ? __( 'Buy Now', WPOWP_TEXT_DOMAIN ) : $add_cart_label;
+ $add_cart_label = ( 'Buy Now' === trim( $add_cart_label ) ) ? __( 'Buy Now', 'wpowp' ) : $add_cart_label;
$add_cart_txt = apply_filters( 'wpowp_translate_add_cart_txt', $add_cart_label );
return ( false === filter_var( $this->settings['standard_add_cart'], FILTER_VALIDATE_BOOLEAN ) ) ? esc_html( $add_cart_txt ) : '';
@@ -131,7 +134,7 @@
public function free_product( $price, $product ) {
$free_price_label = $this->settings['free_product_text'];
- $free_price_label = ( 'FREE' === trim( $free_price_label ) ) ? __( 'FREE', WPOWP_TEXT_DOMAIN ) : $free_price_label;
+ $free_price_label = ( 'FREE' === trim( $free_price_label ) ) ? __( 'FREE', 'wpowp' ) : $free_price_label;
$free_price_txt = apply_filters( 'wpowp_translate_free_product_text', $free_price_label );
if ( $product->is_type( 'variable' ) ) {
@@ -240,7 +243,7 @@
*/
public function order_btntext() {
$order_btntext = $this->settings['order_button_text'];
- $order_btntext = ( 'Place Order' === trim( $order_btntext ) ) ? __( 'Place Order', WPOWP_TEXT_DOMAIN ) : $order_btntext;
+ $order_btntext = ( 'Place Order' === trim( $order_btntext ) ) ? __( 'Place Order', 'wpowp' ) : $order_btntext;
$order_button_text = apply_filters( 'wpowp_translate_add_cart_txt', $order_btntext );
return esc_html( $order_button_text );
}
@@ -351,7 +354,7 @@
*/
public function remove_additional_info_tab( $tabs ) {
- if ( is_product() && !is_user_logged_in() ) {
+ if ( is_product() && ! is_user_logged_in() ) {
unset( $tabs['additional_information'] );
}
--- a/wc-place-order-without-payment/inc/WPOWP_Rest_API.php
+++ b/wc-place-order-without-payment/inc/WPOWP_Rest_API.php
@@ -50,7 +50,7 @@
'permission_callback' => array( $this, 'get_write_api_permission_check' ),
'args' => array(
'settings' => array(
- 'description' => __( 'Plugin settings', WPOWP_TEXT_DOMAIN ),
+ 'description' => __( 'Plugin settings', 'wpowp' ),
'type' => 'json',
'validate_callback' => 'rest_validate_request_arg',
'sanitize_callback' => array( $this, 'sanitize_request' ),
@@ -70,7 +70,7 @@
'permission_callback' => array( $this, 'get_write_api_permission_check' ),
'args' => array(
'settings' => array(
- 'description' => __( 'Plugin settings', WPOWP_TEXT_DOMAIN ),
+ 'description' => __( 'Plugin settings', 'wpowp' ),
'type' => 'json',
'validate_callback' => 'rest_validate_request_arg',
'sanitize_callback' => array( $this, 'sanitize_request' ),
@@ -90,7 +90,7 @@
'permission_callback' => array( $this, 'get_write_api_permission_check' ),
'args' => array(
'term' => array(
- 'description' => __( 'Term', WPOWP_TEXT_DOMAIN ),
+ 'description' => __( 'Term', 'wpowp' ),
'type' => 'json',
'validate_callback' => 'rest_validate_request_arg',
'sanitize_callback' => array( $this, 'sanitize_request' ),
@@ -203,7 +203,7 @@
WPOWP_Admin::get_instance()->set_option( 'wpowp_settings', ( $settings ) );
$this->response['success'] = true;
- $this->response['message'] = __( 'Settings Saved', WPOWP_TEXT_DOMAIN );
+ $this->response['message'] = __( 'Settings Saved', 'wpowp' );
return rest_ensure_response( $this->response );
@@ -215,7 +215,7 @@
delete_option( 'wpowp_settings' );
$this->response['success'] = true;
- $this->response['message'] = __( 'Settings Reset', WPOWP_TEXT_DOMAIN );
+ $this->response['message'] = __( 'Settings Reset', 'wpowp' );
return rest_ensure_response( $this->response );
@@ -230,7 +230,7 @@
WPOWP_Admin::get_instance()->set_option( 'wpowp_settings', ( $settings ) );
$this->response['success'] = true;
- $this->response['message'] = __( 'Settings Saved', WPOWP_TEXT_DOMAIN );
+ $this->response['message'] = __( 'Settings Saved', 'wpowp' );
return rest_ensure_response( $this->response );
@@ -376,7 +376,5 @@
return current_user_can( 'manage_options' ) ? true : false;
}
- }
-
- WPOWP_Rest_API::get_instance();
+ }
}
--- a/wc-place-order-without-payment/templates/admin/header.php
+++ b/wc-place-order-without-payment/templates/admin/header.php
@@ -6,21 +6,21 @@
$div = '<nav class="mt-3 nav nav-pills justify-content-center">';
-$div .= '<li class="nav-item"><a class="nav-link ' . ( 'settings' === $current_tab ? 'active' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=settings">' . __( 'Settings', WPOWP_TEXT_DOMAIN ) . '</a> </li> ';
+$div .= '<li class="nav-item"><a class="nav-link ' . ( 'settings' === $current_tab ? 'active' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=settings">' . __( 'Settings', 'wpowp' ) . '</a> </li> ';
if ( $wpowp_fs->is_paying() ) {
- $div .= '<li class="nav-item"><a class="nav-link ' . ( 'rules' === $current_tab ? 'button-primary' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=rules">' . __( 'Rules', WPOWP_TEXT_DOMAIN ) . '</a> </li> ';
+ $div .= '<li class="nav-item"><a class="nav-link ' . ( 'rules' === $current_tab ? 'active' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=rules">' . __( 'Rules', 'wpowp' ) . '</a> </li> ';
} else {
- $div .= '<li class="nav-item"><a class="nav-link ' . ( 'rules' === $current_tab ? 'button-primary' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=rules">' . __( 'Rules (PRO)', WPOWP_TEXT_DOMAIN ) . '</a> </li> ';
+ $div .= '<li class="nav-item"><a class="nav-link ' . ( 'rules' === $current_tab ? 'active' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=rules">' . __( 'Rules (PRO)', 'wpowp' ) . '</a> </li> ';
}
if ( $wpowp_fs->is_paying() ) {
- $div .= '<li class="nav-item"><a class="nav-link ' . ( 'quote-only' === $current_tab ? 'button-primary' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=quote-only">' . __( 'Request Quote', WPOWP_TEXT_DOMAIN ) . '</a> </li> ';
+ $div .= '<li class="nav-item"><a class="nav-link ' . ( 'quote-only' === $current_tab ? 'active' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=quote-only">' . __( 'Request Quote', 'wpowp' ) . '</a> </li> ';
} else {
- $div .= '<li class="nav-item"><a class="nav-link ' . ( 'quote-only' === $current_tab ? 'button-primary' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=quote-only">' . __( 'Request Quote (PRO)', WPOWP_TEXT_DOMAIN ) . '</a> </li> ';
+ $div .= '<li class="nav-item"><a class="nav-link ' . ( 'quote-only' === $current_tab ? 'active' : '' ) . '" href="' . admin_url( 'admin.php?page=' . WPOWP_PLUGIN_SLUG ) . '&tab=quote-only">' . __( 'Request Quote (PRO)', 'wpowp' ) . '</a> </li> ';
}
-$div .= '<li class="nav-item"><a class="nav-link ' . '" target="_blank" href="https://nitin247.com/docs/place-order-without-payment">' . __( 'Documentation', WPOWP_TEXT_DOMAIN ) . '</a> </li> ';
+$div .= '<li class="nav-item"><a class="nav-link ' . '" target="_blank" href="https://nitin247.com/docs/place-order-without-payment">' . __( 'Documentation', 'wpowp' ) . '</a> </li> ';
$div .= "</nav>";
--- a/wc-place-order-without-payment/templates/admin/quote-only.php
+++ b/wc-place-order-without-payment/templates/admin/quote-only.php
@@ -10,7 +10,7 @@
?>
<div class="container">
- <h1><?php esc_html_e( 'Request Quote ( Quote Only )', WPOWP_TEXT_DOMAIN ); ?></h1>
+ <h1><?php esc_html_e( 'Request Quote ( Quote Only )', 'wpowp' ); ?></h1>
<form id="<?php echo esc_attr( WPOWP_PLUGIN_PREFIX ); ?>settings-form" method="post" action="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>">
<?php
if ( $wpowp_fs->is_paying() ) {
@@ -18,7 +18,7 @@
<table class="form-table wpowp-content-table">
<tbody>
<tr>
- <th scope="row"><?php esc_html_e( 'Enable Site-Wide', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Enable Site-Wide', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -28,13 +28,13 @@
<input name="wpowp_quote_only" type="hidden" value="no" />
<input name="wpowp_quote_only" type="checkbox" id="wpowp_quote_only" value="yes"
<?php echo ( true === filter_var( $option['quote_only'], FILTER_VALIDATE_BOOLEAN ) ) ? 'checked' : ''; ?> />
- <p><?php esc_html_e( '( Enable Quote Only / Request Quote store-wide in WooCommerce )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Enable Quote Only / Request Quote store-wide in WooCommerce )', 'wpowp' ); ?></p>
</label>
</fieldset>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'Hide Place Order Button', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Hide Place Order Button', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -44,25 +44,25 @@
<input name="wpowp_hide_place_order_button" type="hidden" value="no" />
<input name="wpowp_hide_place_order_button" type="checkbox" id="wpowp_hide_place_order_button" value="yes"
<?php echo ( true === filter_var( $option['hide_place_order_button'], FILTER_VALIDATE_BOOLEAN ) ) ? 'checked' : ''; ?> />
- <p><?php esc_html_e( '( Hide Place Order Button )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Hide Place Order Button )', 'wpowp' ); ?></p>
</label>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_quote_button_postion"><?php esc_html_e( 'Quote Only Button Position', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_quote_button_postion"><?php esc_html_e( 'Quote Only Button Position', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" name="wpowp_quote_button_postion" id="wpowp_quote_button_postion">
- <option value="after_submit" <?php echo ( 'after_submit' === $option['quote_button_postion'] ) ? 'selected' : ''; ?>><?php esc_html_e( 'After Payment Button', WPOWP_TEXT_DOMAIN ); ?></option>
- <option value="before_submit" <?php echo ( 'before_submit' === $option['quote_button_postion'] ) ? 'selected' : ''; ?>><?php esc_html_e( 'Before Payment Button', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value="after_submit" <?php echo ( 'after_submit' === $option['quote_button_postion'] ) ? 'selected' : ''; ?>><?php esc_html_e( 'After Payment Button', 'wpowp' ); ?></option>
+ <option value="before_submit" <?php echo ( 'before_submit' === $option['quote_button_postion'] ) ? 'selected' : ''; ?>><?php esc_html_e( 'Before Payment Button', 'wpowp' ); ?></option>
</select>
- <p><?php esc_html_e( '( Where to place Quote Only button )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Where to place Quote Only button )', 'wpowp' ); ?></p>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'Quote Button Text', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Quote Button Text', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -71,7 +71,7 @@
<label for="wpowp_quote_button_text">
<input class="regular-text" name="wpowp_quote_button_text" type="text" id="wpowp_quote_button_text" value="<?php echo esc_attr( $option['quote_button_text'] ); ?>"
<?php echo ( true === filter_var( $option['quote_only'], FILTER_VALIDATE_BOOLEAN ) ) ? 'checked' : ''; ?> />
- <p><?php esc_html_e( '( Text for Quote button )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Text for Quote button )', 'wpowp' ); ?></p>
</label>
</fieldset>
</td>
@@ -86,7 +86,7 @@
<table class="form-table wpowp-content-table">
<tbody>
<tr>
- <th scope="row"><?php esc_html_e( 'Quote Only / Request Quote', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Quote Only / Request Quote', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -94,13 +94,13 @@
</legend>
<label for="wpowp_quote_only">
<input name="wpowp_quote_only" type="checkbox" id="wpowp_quote_only" disabled value="disabled" />
- <p><?php esc_html_e( '( Enable Quote Only button )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Enable Quote Only button )', 'wpowp' ); ?></p>
</label>
</fieldset>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'Hide Place Order Button', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Hide Place Order Button', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -109,38 +109,38 @@
<label for="wpowp_hide_place_order_button">
<input name="wpowp_hide_place_order_button" type="hidden" value="no" />
<input name="wpowp_hide_place_order_button" type="checkbox" id="wpowp_hide_place_order_button" disabled value="disabled" />
- <p><?php esc_html_e( '( Hide Place Order Button )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Hide Place Order Button )', 'wpowp' ); ?></p>
</label>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_quote_button_postion"><?php esc_html_e( 'Quote Only Button Position', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_quote_button_postion"><?php esc_html_e( 'Quote Only Button Position', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" name="wpowp_quote_button_postion" id="wpowp_quote_button_postion" disabled>
- <option value="after_submit"><?php esc_html_e( 'After Payment Button', WPOWP_TEXT_DOMAIN ); ?></option>
- <option value="before_submit"><?php esc_html_e( 'Before Payment Button', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value="after_submit"><?php esc_html_e( 'After Payment Button', 'wpowp' ); ?></option>
+ <option value="before_submit"><?php esc_html_e( 'Before Payment Button', 'wpowp' ); ?></option>
</select>
- <p><?php esc_html_e( '( Where to place Quote Only button )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Where to place Quote Only button )', 'wpowp' ); ?></p>
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_quote_button_postion"><?php esc_html_e( 'Quote Only Button Position', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_quote_button_postion"><?php esc_html_e( 'Quote Only Button Position', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" name="wpowp_quote_button_postion" id="wpowp_quote_button_postion" disabled>
- <option value="after_submit" <?php echo ( 'after_submit' === $option['quote_button_postion'] ) ? 'selected' : ''; ?>><?php esc_html_e( 'After Payment Button', WPOWP_TEXT_DOMAIN ); ?></option>
- <option value="before_submit" <?php echo ( 'before_submit' === $option['quote_button_postion'] ) ? 'selected' : ''; ?>><?php esc_html_e( 'Before Payment Button', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value="after_submit" <?php echo ( 'after_submit' === $option['quote_button_postion'] ) ? 'selected' : ''; ?>><?php esc_html_e( 'After Payment Button', 'wpowp' ); ?></option>
+ <option value="before_submit" <?php echo ( 'before_submit' === $option['quote_button_postion'] ) ? 'selected' : ''; ?>><?php esc_html_e( 'Before Payment Button', 'wpowp' ); ?></option>
</select>
- <p><?php esc_html_e( '( Where to place Quote Only button )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Where to place Quote Only button )', 'wpowp' ); ?></p>
</td>
</tr>
</tbody>
</table>
- <div><label><?php esc_html_e( 'When clicked it collapses payment methods. Ignores shipping and pushes order through without payment or shipping simply as a quote request.', WPOWP_TEXT_DOMAIN ); ?></label></div>
+ <div><label><?php esc_html_e( 'When clicked it collapses payment methods. Ignores shipping and pushes order through without payment or shipping simply as a quote request.', 'wpowp' ); ?></label></div>
<?php } ?>
@@ -150,16 +150,16 @@
if ( $wpowp_fs->is_paying() ) {
?>
<p class="submit"><input type="submit" name="<?php echo esc_attr( WPOWP_PLUGIN_PREFIX ); ?>settings-submit" id="<?php echo esc_attr( WPOWP_PLUGIN_PREFIX ); ?>settings-submit" class="button button-primary"
- value="<?php esc_attr_e( 'Save Changes', WPOWP_TEXT_DOMAIN ); ?>"></p>
+ value="<?php esc_attr_e( 'Save Changes', 'wpowp' ); ?>"></p>
<?php } else { ?>
<!-- Upgrade to Pro Button -->
<p class="submit-1">
<span>
<a href="<?php echo esc_url( $wpowp_fs->get_upgrade_url() ); ?>" class="button button-primary" target="_blank">
- <?php esc_html_e( 'Upgrade to Pro', WPOWP_TEXT_DOMAIN ); ?>
+ <?php esc_html_e( 'Upgrade to Pro', 'wpowp' ); ?>
</a>
</span>
- <span><?php esc_html_e( 'to avail the Request Quote feature', WPOWP_TEXT_DOMAIN ); ?></span>
+ <span><?php esc_html_e( 'to avail the Request Quote feature', 'wpowp' ); ?></span>
</p>
<?php } ?>
</form>
--- a/wc-place-order-without-payment/templates/admin/rules.php
+++ b/wc-place-order-without-payment/templates/admin/rules.php
@@ -15,15 +15,15 @@
<div class="container">
- <h1><?php esc_html_e( 'Rules', WPOWP_TEXT_DOMAIN ); ?></h1>
- <p><?php esc_html_e( 'The options below facilitate the configuration of Place Order Without Pyment for WooCommerce PRO, enhancing customer engagement.', WPOWP_TEXT_DOMAIN ); ?></p>
+ <h1><?php esc_html_e( 'Rules', 'wpowp' ); ?></h1>
+ <p><?php esc_html_e( 'The options below facilitate the configuration of Place Order Without Pyment for WooCommerce PRO, enhancing customer engagement.', 'wpowp' ); ?></p>
<div id="group-container"></div>
<div id="button-container" style="display:none;">
<!-- Add New Rule Group Button -->
<button type="button" class="button button-secondary" id="add-group-btn">
- <?php esc_html_e( 'Add New Rule', WPOWP_TEXT_DOMAIN ); ?>
+ <?php esc_html_e( 'Add New Rule', 'wpowp' ); ?>
</button>
<?php if ( $wpowp_fs->is_paying() ) { ?>
<!-- Save Changes Button -->
@@ -34,7 +34,7 @@
<!-- Upgrade to Pro Button -->
<span>
<a href="<?php echo esc_url( $wpowp_fs->get_upgrade_url() ); ?>" class="button button-primary" target="_blank">
- <?php esc_html_e( 'Upgrade to Pro', WPOWP_TEXT_DOMAIN ); ?>
+ <?php esc_html_e( 'Upgrade to Pro', 'wpowp' ); ?>
</a>
</span>
<?php } ?>
@@ -46,39 +46,74 @@
<!-- Header: Move and Remove Buttons -->
<div class="d-flex justify-content-between align-items-center mb-3">
<div class="d-flex align-items-center">
- <a href="javascript:void(0)">
- <i class="text-secondary fas fa-bars"></i>
+ <a href="javascript:void(0)" class="text-decoration-none">
+ <i class="text-secondary dashicons dashicons-menu"></i>
</a>
</div>
<div class="d-flex align-items-center">
- <a class="btn btn-sm remove-group-btn" title="<?php echo esc_attr( 'Remove Group', WPOWP_TEXT_DOMAIN ); ?>">
+ <a class="btn btn-sm remove-group-btn" title="<?php echo esc_attr( 'Remove Group', 'wpowp' ); ?>">
<i class="dashicons dashicons-remove text-danger"></i>
</a>
</div>
</div>
<!-- Toggle Switches for Order Options -->
- <div class="d-flex justify-content-around mb-2">
+ <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-xl-4 mb-3">
<!-- Place Order Switch -->
- <div class="d-inline-block">
+ <div class="col">
<input class="my-1 placeOrderSwitch" type="checkbox" id="placeOrderSwitch" name="placeOrderSwitch" checked value="1"
- title="<?php echo esc_attr( 'Toggle to enable or disable Place Order Without Payment.', WPOWP_TEXT_DOMAIN ); ?>" />
- <label for="placeOrderSwitch"><?php esc_html_e( 'Place Order Without Payment', WPOWP_TEXT_DOMAIN ); ?></label>
+ title="<?php echo esc_attr( 'Toggle to enable or disable Place Order Without Payment.', 'wpowp' ); ?>" />
+ <label for="placeOrderSwitch"><?php esc_html_e( 'Place Order Without Payment', 'wpowp' ); ?></label>
</div>
<!-- Request Quote Switch -->
- <div class="d-inline-block">
+ <div class="col">
<input class="my-1 requestQuoteSwitch" type="checkbox" id="requestQuoteSwitch" name="requestQuoteSwitch" checked value="1"
- title="<?php echo esc_attr( 'Toggle to enable or disable Request Quote button.', WPOWP_TEXT_DOMAIN ); ?>" />
- <label for="requestQuoteSwitch"><?php esc_html_e( 'Request Quote', WPOWP_TEXT_DOMAIN ); ?></label>
+ title="<?php echo esc_attr( 'Toggle to enable or disable Request Quote button.', 'wpowp' ); ?>" />
+ <label for="requestQuoteSwitch"><?php esc_html_e( 'Request Quote', 'wpowp' ); ?></label>
</div>
+ <!-- Order Button Text Switch -->
+ <div class="col">
+ <input class="my-1 orderButtonTextSwitch" type="checkbox" id="orderButtonTextSwitch" name="orderButtonTextSwitch" value="0"
+ title="<?php echo esc_attr( 'Toggle to enable or disable Custom Order Button Text.', 'wpowp' ); ?>" />
+ <label for="orderButtonTextSwitch"><?php esc_html_e( 'Custom Order Button Text', 'wpowp' ); ?></label>
+ </div>
+
+ <!-- Remove Shipping Fields and rates Switch -->
+ <!-- <div class="col">
+ <input class="my-1 removeShippingFieldsRatesSwitch" type="checkbox" id="removeShippingFieldsRatesSwitch" name="removeShippingFieldsRatesSwitch" value="0"
+ title="<?php echo esc_attr( 'Toggle to enable or disable Remove shipping fields and rates.', 'wpowp' ); ?>" />
+ <label for="removeShippingFieldsRatesSwitch"><?php esc_html_e( 'Remove shipping fields, rates', 'wpowp' ); ?></label>
+ </div> -->
+
+ <!-- Remove Tax rates Switch -->
+ <!-- <div class="col">
+ <input class="my-1 removeTaxRatesSwitch" type="checkbox" id="removeTaxRatesSwitch" name="removeTaxRatesSwitch" value="0"
+ title="<?php echo esc_attr( 'Toggle to enable or disable Remove Tax rates.', 'wpowp' ); ?>" />
+ <label for="removeTaxRatesSwitch"><?php esc_html_e( 'Remove Tax rates', 'wpowp' ); ?></label>
+ </div> -->
+
+ <!-- Remove Checkout Privacy Switch -->
+ <!-- <div class="col">
+ <input class="my-1 removeCheckoutPrivacySwitch" type="checkbox" id="removeCheckoutPrivacySwitch" name="removeCheckoutPrivacySwitch" value="0"
+ title="<?php echo esc_attr( 'Toggle to enable or disable Remove checkout privacy text.', 'wpowp' ); ?>" />
+ <label for="removeCheckoutPrivacySwitch"><?php esc_html_e( 'Remove checkout privacy text', 'wpowp' ); ?></label>
+ </div> -->
+
+ <!-- Remove Checkout Terms Switch -->
+ <!-- <div class="col">
+ <input class="my-1 removeCheckoutTermsSwitch" type="checkbox" id="removeCheckoutTermsSwitch" name="removeCheckoutTermsSwitch" value="0"
+ title="<?php echo esc_attr( 'Toggle to enable or disable Remove checkout terms and conditions.', 'wpowp' ); ?>" />
+ <label for="removeCheckoutTermsSwitch"><?php esc_html_e( 'Remove checkout terms', 'wpowp' ); ?></label>
+ </div> -->
+
<!-- Order Approval Switch (Commented Out) -->
<!--
<div class="d-inline-block">
<input class="my-1 orderApprovalSwitch" type="checkbox" id="orderApprovalSwitch" name="orderApprovalSwitch" checked value="1"
- title="<?php echo esc_attr( 'Toggle to enable or disable order approval.', WPOWP_TEXT_DOMAIN ); ?>" />
- <label for="orderApprovalSwitch"><?php esc_html_e( 'Order Approval', WPOWP_TEXT_DOMAIN ); ?></label>
+ title="<?php echo esc_attr( 'Toggle to enable or disable order approval.', 'wpowp' ); ?>" />
+ <label for="orderApprovalSwitch"><?php esc_html_e( 'Order Approval', 'wpowp' ); ?></label>
</div>
-->
</div>
@@ -88,7 +123,7 @@
<!-- Add Condition Button -->
<button type="button" class="btn btn-secondary btn-sm add-rule-btn">
- <?php esc_html_e( 'Add Condition', WPOWP_TEXT_DOMAIN ); ?>
+ <?php esc_html_e( 'Add Condition', 'wpowp' ); ?>
</button>
</div>
</script>
@@ -105,20 +140,20 @@
<div class="col-md-4">
<!-- Value Input -->
<div class="value-input">
- <input name="value" type="text" class="form-control input-value" placeholder="<?php echo esc_attr( 'Enter value', WPOWP_TEXT_DOMAIN ); ?>">
+ <input name="value" type="text" class="form-control input-value" placeholder="<?php echo esc_attr( 'Enter value', 'wpowp' ); ?>">
</div>
<!-- Value Select -->
<div class="value-select" style="display:none;">
<select name="value" class="form-select select-value">
- <option value=""><?php esc_html_e( 'Select a value', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value=""><?php esc_html_e( 'Select a value', 'wpowp' ); ?></option>
</select>
</div>
<!-- Value Multiselect -->
<div class="value-multiselect" style="display:none;">
<select name="value" class="form-select select2-multiselect multiselect-value" multiple>
- <option value=""><?php esc_html_e( 'Select multiple values', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value=""><?php esc_html_e( 'Select multiple values', 'wpowp' ); ?></option>
</select>
</div>
</div>
@@ -126,14 +161,14 @@
<!-- Condition Selector -->
<div class="col-md-1">
<select class="form-select condition-selector">
- <option value="AND"><?php esc_html_e( ' and ', WPOWP_TEXT_DOMAIN ); ?></option>
- <option value="OR"><?php esc_html_e( ' or ', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value="AND"><?php esc_html_e( ' and ', 'wpowp' ); ?></option>
+ <option value="OR"><?php esc_html_e( ' or ', 'wpowp' ); ?></option>
</select>
</div>
<!-- Remove Rule Button -->
<div class="col-md-1 text-end">
- <a href="javascript:void(0)" class="btn btn-sm remove-rule-btn" title="<?php echo esc_attr( 'Remove Rule', WPOWP_TEXT_DOMAIN ); ?>">
+ <a href="javascript:void(0)" class="btn btn-sm remove-rule-btn" title="<?php echo esc_attr( 'Remove Rule', 'wpowp' ); ?>">
<i class="dashicons dashicons-remove text-danger"></i>
</a>
</div>
--- a/wc-place-order-without-payment/templates/admin/settings.php
+++ b/wc-place-order-without-payment/templates/admin/settings.php
@@ -9,14 +9,14 @@
?>
<div class="container">
- <h1><?php esc_html_e( 'Settings', WPOWP_TEXT_DOMAIN ); ?></h1>
+ <h1><?php esc_html_e( 'Settings', 'wpowp' ); ?></h1>
<form id="<?php echo esc_attr( WPOWP_PLUGIN_PREFIX ); ?>settings-form" method="post" action="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>">
<table class="form-table wpowp-content-table">
<tbody>
<?php if ( $wpowp_fs->is_paying() ) { ?>
<tr>
- <th scope="row"><?php esc_html_e( 'Enable Site-Wide', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Enable Site-Wide', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -29,14 +29,14 @@
</label>
</fieldset>
- <p><?php esc_html_e( '( Enable Place Order Without Payment store-wide in WooCommerce )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Enable Place Order Without Payment store-wide in WooCommerce )', 'wpowp' ); ?></p>
</td>
</tr>
<?php } ?>
<tr class="wpowp-admin-separator">
<th scope="row"><label
- for="wpowp_order_status"><?php esc_html_e( 'Order Status', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_order_status"><?php esc_html_e( 'Order Status', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" name="wpowp_order_status" id="wpowp_order_status">
@@ -49,11 +49,11 @@
}
?>
</select>
- <p><?php esc_html_e( '( Order status after placing order )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Order status after placing order )', 'wpowp' ); ?></p>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'Skip Cart', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Skip Cart', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -66,11 +66,11 @@
</label>
</fieldset>
- <p><?php esc_html_e( '( Skip Cart & Go to Checkout on Add to Cart )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Skip Cart & Go to Checkout on Add to Cart )', 'wpowp' ); ?></p>
</td>
</tr>
<tr class="wpowp-admin-separator">
- <th scope="row"><?php esc_html_e( 'Standard Add Cart Button', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Standard WooCommerce Buttons', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -82,28 +82,28 @@
<?php echo ( true === filter_var( $option['standard_add_cart'], FILTER_VALIDATE_BOOLEAN ) ) ? 'checked' : ''; ?> />
</label>
</fieldset>
- <p><?php esc_html_e( '( Standard Add to cart button on shop pages )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Standard WooCommerce button on shop pages )', 'wpowp' ); ?></p>
</td>
</tr>
<tr class="">
<th scope="row"><label
- for="wpowp_order_status"><?php esc_html_e( 'Hide Price', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_order_status"><?php esc_html_e( 'Hide Price', 'wpowp' ); ?></label>
</th>
<td>
- <label class="radio-inline"><input type="radio" name="wpowp_hide_price" value="no" <?php echo ( 'no' === $option['hide_price'] ) ? 'checked':'' ?> /> <?php esc_html_e( 'None', WPOWP_TEXT_DOMAIN ); ?> </label>
- <label class="radio-inline"><input type="radio" name="wpowp_hide_price" value="logged_out" <?php echo ( 'logged_out' === $option['hide_price'] ) ? 'checked':'' ?> /> <?php esc_html_e( 'Logged Out user', WPOWP_TEXT_DOMAIN ); ?> </label>
- <p><?php esc_html_e( '( Hide Product Price )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <label class="radio-inline"><input type="radio" name="wpowp_hide_price" value="no" <?php echo ( 'no' === $option['hide_price'] ) ? 'checked':'' ?> /> <?php esc_html_e( 'None', 'wpowp' ); ?> </label>
+ <label class="radio-inline"><input type="radio" name="wpowp_hide_price" value="logged_out" <?php echo ( 'logged_out' === $option['hide_price'] ) ? 'checked':'' ?> /> <?php esc_html_e( 'Logged Out user', 'wpowp' ); ?> </label>
+ <p><?php esc_html_e( '( Hide Product Price )', 'wpowp' ); ?></p>
</td>
</tr>
<tr class="wpowp-admin-separator">
<th scope="row">
<label
- for="wpowp_order_status"><?php esc_html_e( 'Hide Additional Information Tab', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_order_status"><?php esc_html_e( 'Hide Additional Information Tab', 'wpowp' ); ?></label>
</th>
<td>
- <label class="radio-inline"><input type="radio" name="wpowp_hide_additional_info_tab" value="no" <?php echo ( 'no' === $option['hide_additional_info_tab'] ) ? 'checked':'' ?> /> <?php esc_html_e( 'None', WPOWP_TEXT_DOMAIN ); ?> </label>
- <label class="radio-inline"><input type="radio" name="wpowp_hide_additional_info_tab" value="logged_out" <?php echo ( 'logged_out' === $option['hide_additional_info_tab'] ) ? 'checked':'' ?> /> <?php esc_html_e( 'Logged Out user', WPOWP_TEXT_DOMAIN ); ?> </label>
- <p><?php esc_html_e( '( Hide Additional Information Tab on Product Page )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <label class="radio-inline"><input type="radio" name="wpowp_hide_additional_info_tab" value="no" <?php echo ( 'no' === $option['hide_additional_info_tab'] ) ? 'checked':'' ?> /> <?php esc_html_e( 'None', 'wpowp' ); ?> </label>
+ <label class="radio-inline"><input type="radio" name="wpowp_hide_additional_info_tab" value="logged_out" <?php echo ( 'logged_out' === $option['hide_additional_info_tab'] ) ? 'checked':'' ?> /> <?php esc_html_e( 'Logged Out user', 'wpowp' ); ?> </label>
+ <p><?php esc_html_e( '( Hide Additional Information Tab on Product Page )', 'wpowp' ); ?></p>
</td>
</tr>
<?php
@@ -111,64 +111,64 @@
?>
<tr class="wpowp-admin-separator-1">
- <th scope="row"><?php esc_html_e( 'Add to cart text', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Add to cart text', 'wpowp' ); ?></th>
<td>
<input name="wpowp_add_cart_text" class="regular-text"type="text" value="<?php echo esc_attr( $option['add_cart_text'] ); ?>" />
- <p><?php esc_html_e( '( Add to cart text works if Standard Add to cart is unchecked )', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( Add to cart text works if Standard Add to cart is unchecked )', 'wpowp' ); ?></p>
</td>
</tr>
<tr class="wpowp-admin-separator">
- <th scope="row"><?php esc_html_e( 'Order button text', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Order button text', 'wpowp' ); ?></th>
<td>
<input name="wpowp_order_button_text" class="regular-text"type="text" value="<?php echo esc_attr( $option['order_button_text'] ); ?>" />
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_remove_shipping_adress"><?php esc_html_e( 'Remove shipping fields & rates', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_remove_shipping_adress"><?php esc_html_e( 'Remove shipping fields & rates', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" name="wpowp_remove_shipping" >
- <option value="no" <?php echo ( false === filter_var( $option['remove_shipping'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'No', WPOWP_TEXT_DOMAIN ); ?></option>
- <option value="yes" <?php echo ( true === filter_var( $option['remove_shipping'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'Yes', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value="no" <?php echo ( false === filter_var( $option['remove_shipping'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'No', 'wpowp' ); ?></option>
+ <option value="yes" <?php echo ( true === filter_var( $option['remove_shipping'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'Yes', 'wpowp' ); ?></option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_remove_shipping_adress"><?php esc_html_e( 'Remove Tax Rates', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_remove_shipping_adress"><?php esc_html_e( 'Remove Tax Rates', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" name="wpowp_remove_taxes" >
- <option value="no" <?php echo ( false === filter_var( $option['remove_taxes'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'No', WPOWP_TEXT_DOMAIN ); ?></option>
- <option value="yes" <?php echo ( true === filter_var( $option['remove_taxes'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'Yes', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value="no" <?php echo ( false === filter_var( $option['remove_taxes'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'No', 'wpowp' ); ?></option>
+ <option value="yes" <?php echo ( true === filter_var( $option['remove_taxes'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'Yes', 'wpowp' ); ?></option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_remove_privacy_policy_text"><?php esc_html_e( 'Remove checkout privacy text', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_remove_privacy_policy_text"><?php esc_html_e( 'Remove checkout privacy text', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" name="wpowp_remove_privacy_policy_text">
- <option value="no" <?php echo ( false === filter_var( $option['remove_privacy_policy_text'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'No', WPOWP_TEXT_DOMAIN ); ?></option>
- <option value="yes" <?php echo ( true === filter_var( $option['remove_privacy_policy_text'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'Yes', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value="no" <?php echo ( false === filter_var( $option['remove_privacy_policy_text'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'No', 'wpowp' ); ?></option>
+ <option value="yes" <?php echo ( true === filter_var( $option['remove_privacy_policy_text'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'Yes', 'wpowp' ); ?></option>
</select>
</td>
</tr>
<tr class="wpowp-admin-separator">
<th scope="row"><label
- for="wpowp_remove_checkout_terms_conditions"><?php esc_html_e( 'Remove checkout terms and conditions', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_remove_checkout_terms_conditions"><?php esc_html_e( 'Remove checkout terms and conditions', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" name="wpowp_remove_checkout_terms_conditions">
- <option value="no" <?php echo ( false === filter_var( $option['remove_checkout_terms_conditions'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'No', WPOWP_TEXT_DOMAIN ); ?></option>
- <option value="yes" <?php echo ( true === filter_var( $option['remove_checkout_terms_conditions'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'Yes', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option value="no" <?php echo ( false === filter_var( $option['remove_checkout_terms_conditions'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'No', 'wpowp' ); ?></option>
+ <option value="yes" <?php echo ( true === filter_var( $option['remove_checkout_terms_conditions'], FILTER_VALIDATE_BOOLEAN ) ) ? 'selected' : ''; ?>><?php esc_html_e( 'Yes', 'wpowp' ); ?></option>
</select>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'Free Product', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Free Product', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -178,12 +178,12 @@
<input type="hidden" name="wpowp_free_product" value="no" />
<input name="wpowp_free_product" type="checkbox" id="wpowp_free_product" value="yes" <?php echo ( true === filter_var( $option['free_product'], FILTER_VALIDATE_BOOLEAN ) ) ? 'checked' : ''; ?> />
</label>
- <p><?php esc_html_e( '( For WooCommerce price label of $0.00, show custom text, such as the word “FREE”)', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( For WooCommerce price label of $0.00, show custom text, such as the word “FREE”)', 'wpowp' ); ?></p>
</fieldset>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'On Checkout', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'On Checkout', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -193,12 +193,12 @@
<input type="hidden" name="wpowp_free_product_on_checkout" value="no" />
<input name="wpowp_free_product_on_checkout" type="checkbox" id="wpowp_free_product_on_checkout" value="yes" <?php echo ( true === filter_var( $option['free_product_on_checkout'], FILTER_VALIDATE_BOOLEAN ) ) ? 'checked' : ''; ?> />
</label>
- <p><?php esc_html_e( '( On Checkout page for WooCommerce price label of $0.00, show custom text, such as the word “FREE”)', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( On Checkout page for WooCommerce price label of $0.00, show custom text, such as the word “FREE”)', 'wpowp' ); ?></p>
</fieldset>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'On Cart', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'On Cart', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -208,12 +208,12 @@
<input type="hidden" name="wpowp_free_product_on_cart" value="no" />
<input name="wpowp_free_product_on_cart" type="checkbox" id="wpowp_free_product_on_cart" value="yes" <?php echo ( true === filter_var( $option['free_product_on_cart'], FILTER_VALIDATE_BOOLEAN ) ) ? 'checked' : ''; ?> />
</label>
- <p><?php esc_html_e( '( On Cart page for WooCommerce price label of $0.00, show custom text, such as the word “FREE”)', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( '( On Cart page for WooCommerce price label of $0.00, show custom text, such as the word “FREE”)', 'wpowp' ); ?></p>
</fieldset>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'Free product text', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Free product text', 'wpowp' ); ?></th>
<td>
<input name="wpowp_free_product_text" class="regular-text"type="text" value="<?php echo esc_attr( $option['free_product_text'] ); ?>" />
</td>
@@ -228,74 +228,74 @@
<table class="form-table wpowp-content-table" >
<tbody>
<tr>
- <th scope="row"><?php esc_html_e( 'Available in PRO Version', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Available in PRO Version', 'wpowp' ); ?></th>
<td>
- <p><?php esc_html_e( 'Features listed below are Available in PRO version only ', WPOWP_TEXT_DOMAIN ); ?></p>
+ <p><?php esc_html_e( 'Features listed below are Available in PRO version only ', 'wpowp' ); ?></p>
<p>
<a href="<?php echo esc_url( $wpowp_fs->get_upgrade_url() ); ?>" class="button button-primary" target="_blank">
- <?php esc_html_e( 'Upgrade to Pro', WPOWP_TEXT_DOMAIN ); ?>
+ <?php esc_html_e( 'Upgrade to Pro', 'wpowp' ); ?>
</a>
</p>
</td>
</tr>
<tr class="wpowp-admin-separator-1">
- <th scope="row"><?php esc_html_e( 'Add to cart text', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Add to cart text', 'wpowp' ); ?></th>
<td>
<input disabled class="regular-text"type="text" value="<?php echo esc_attr( $option['add_cart_text'] ); ?>" />
</td>
</tr>
<tr class="wpowp-admin-separator">
- <th scope="row"><?php esc_html_e( 'Order button text', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Order button text', 'wpowp' ); ?></th>
<td>
<input disabled class="regular-text"type="text" value="<?php echo esc_attr( $option['order_button_text'] ); ?>" />
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_remove_shipping_adress"><?php esc_html_e( 'Remove shipping fields & rates', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_remove_shipping_adress"><?php esc_html_e( 'Remove shipping fields & rates', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" disabled>
- <option><?php esc_html_e( 'No', WPOWP_TEXT_DOMAIN ); ?></option>
- <option><?php esc_html_e( 'Yes', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option><?php esc_html_e( 'No', 'wpowp' ); ?></option>
+ <option><?php esc_html_e( 'Yes', 'wpowp' ); ?></option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_remove_taxes"><?php esc_html_e( 'Remove Tax Rates', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_remove_taxes"><?php esc_html_e( 'Remove Tax Rates', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" disabled>
- <option><?php esc_html_e( 'No', WPOWP_TEXT_DOMAIN ); ?></option>
- <option><?php esc_html_e( 'Yes', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option><?php esc_html_e( 'No', 'wpowp' ); ?></option>
+ <option><?php esc_html_e( 'Yes', 'wpowp' ); ?></option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label
- for="wpowp_remove_privacy_policy_text"><?php esc_html_e( 'Remove checkout privacy text', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_remove_privacy_policy_text"><?php esc_html_e( 'Remove checkout privacy text', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" disabled>
- <option><?php esc_html_e( 'No', WPOWP_TEXT_DOMAIN ); ?></option>
- <option><?php esc_html_e( 'Yes', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option><?php esc_html_e( 'No', 'wpowp' ); ?></option>
+ <option><?php esc_html_e( 'Yes', 'wpowp' ); ?></option>
</select>
</td>
</tr>
<tr class="wpowp-admin-separator">
<th scope="row"><label
- for="wpowp_remove_checkout_terms_conditions"><?php esc_html_e( 'Remove checkout terms and conditions', WPOWP_TEXT_DOMAIN ); ?></label>
+ for="wpowp_remove_checkout_terms_conditions"><?php esc_html_e( 'Remove checkout terms and conditions', 'wpowp' ); ?></label>
</th>
<td>
<select class="regular-text wc-enhanced-select" disabled>
- <option><?php esc_html_e( 'No', WPOWP_TEXT_DOMAIN ); ?></option>
- <option><?php esc_html_e( 'Yes', WPOWP_TEXT_DOMAIN ); ?></option>
+ <option><?php esc_html_e( 'No', 'wpowp' ); ?></option>
+ <option><?php esc_html_e( 'Yes', 'wpowp' ); ?></option>
</select>
</td>
</tr>
<tr>
- <th scope="row"><?php esc_html_e( 'Free Product', WPOWP_TEXT_DOMAIN ); ?></th>
+ <th scope="row"><?php esc_html_e( 'Free Product', 'wpowp' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
@@ -304,12 +304,12 @@
<label for="wpowp_status">
<input disabled name=""