Plugin Directory

Changeset 3388594


Ignore:
Timestamp:
11/03/2025 05:08:25 AM (5 months ago)
Author:
neebplugins
Message:

Release 2.7.4

Location:
wc-place-order-without-payment
Files:
282 added
11 edited

Legend:

Unmodified
Added
Removed
  • wc-place-order-without-payment/trunk/assets/js/wpowp-rules.js

    r3315539 r3388594  
    3737            (1 == group.removeCheckoutPrivacySwitch) ? groupElement.find('.removeCheckoutPrivacySwitch').attr('checked', true) : groupElement.find('.removeCheckoutPrivacySwitch').attr('checked', false);
    3838            (1 == group.removeCheckoutTermsSwitch) ? groupElement.find('.removeCheckoutTermsSwitch').attr('checked', true) : groupElement.find('.removeCheckoutTermsSwitch').attr('checked', false);
     39            (1 == group.allowPaymentsSwitch) ? groupElement.find('.allowPaymentsSwitch').attr('checked', true) : groupElement.find('.allowPaymentsSwitch').attr('checked', false);
    3940
    4041            // Add rules to the group
     
    499500            var removeCheckoutPrivacySwitch = $(this).find('.removeCheckoutPrivacySwitch').is(':checked') ? 1 : 0;
    500501            var removeCheckoutTermsSwitch = $(this).find('.removeCheckoutTermsSwitch').is(':checked') ? 1 : 0;
     502            var allowPaymentsSwitch = $(this).find('.allowPaymentsSwitch').is(':checked') ? 1 : 0;
    501503
    502504            var rules = [];
     
    532534            data.rules.push({
    533535                placeOrderSwitch: placeOrderSwitch,
     536                allowPaymentsSwitch: allowPaymentsSwitch,
    534537                requestQuoteSwitch: requestQuoteSwitch,
    535538                orderButtonTextSwitch: orderButtonTextSwitch,
     
    537540                removeTaxRatesSwitch: removeTaxRatesSwitch,
    538541                removeCheckoutPrivacySwitch: removeCheckoutPrivacySwitch,
    539                 removeCheckoutTermsSwitch: removeCheckoutTermsSwitch,
     542                removeCheckoutTermsSwitch: removeCheckoutTermsSwitch,               
    540543                rules: rules
    541544            });
     
    560563    });
    561564
     565    // Make the placeOrderSwitch and allowPaymentsSwitch mutually exclusive
     566    $(document).on('change', '.placeOrderSwitch', function() {
     567        if ($(this).is(':checked')) {
     568            $(this).closest('.rule-group').find('.allowPaymentsSwitch').prop('checked', false);
     569        }
     570    });
     571       
     572    $(document).on('change', '.allowPaymentsSwitch', function() {
     573        if ($(this).is(':checked')) {
     574            $(this).closest('.rule-group').find('.placeOrderSwitch').prop('checked', false);
     575        }
     576    });
     577
    562578});
  • wc-place-order-without-payment/trunk/inc/Modules/Rules.php

    r3335822 r3388594  
    1717    protected $options   = array();
    1818    protected $operators = array();
    19     protected $rules     = array();
    20 
     19    protected $rules     = array();
     20
     21    /**
     22     * Constructor
     23     *
     24     * @since 4.1.6
     25     */
    2126    public function __construct() {
    2227        // Define options and option groups
     
    128133    }
    129134
     135    /**
     136     * Create dropdown pages
     137     *
     138     * @return string
     139     */
    130140    public function create_dropdown_pages() {
    131141        $html  = '<select name="rule_pages" class="form-select url-dropdown" required>';
     
    224234            $switch                                    = array();
    225235            $switch['placeOrderSwitch']                = ( isset( $rule_group['placeOrderSwitch'] ) ) ? $rule_group['placeOrderSwitch'] : '';
     236            $switch['allowPaymentsSwitch']             = ( isset( $rule_group['allowPaymentsSwitch'] ) ) ? $rule_group['allowPaymentsSwitch'] : '';
    226237            $switch['requestQuoteSwitch']              = ( isset( $rule_group['requestQuoteSwitch'] ) ) ? $rule_group['requestQuoteSwitch'] : '';
    227238            $switch['orderButtonTextSwitch']           = ( isset( $rule_group['orderButtonTextSwitch'] ) ) ? $rule_group['orderButtonTextSwitch'] : '';
     
    237248
    238249            // Redirect or disable payment methods if valid
    239             if ( $valid ) {
     250            if ( $valid ) {             
    240251                return $switch;
    241252            }
    242253        }
    243254    }
    244 
    245255
    246256    /**
  • wc-place-order-without-payment/trunk/inc/WPOWP_Admin.php

    r3315539 r3388594  
    9999                'hide_additional_info_tab'         => 'no',
    100100                'hide_prices_sitewide'             => 'no',
     101                'order_status_quote' => 'pending'
    101102            );
    102103        }
  • wc-place-order-without-payment/trunk/inc/WPOWP_Front.php

    r3315539 r3388594  
    3434            // Hide price with CSS
    3535            add_action( 'wp_head', array( $this, 'hide_prices_with_css' ) );
     36            // Add Order Meta on Submission
     37            add_action( 'woocommerce_checkout_create_order', array( $this, 'add_quote_order_meta' ), 10, 2 );
    3638        }
    3739
     
    158160                    }
    159161                }
    160             } elseif ( '' !== $product->get_price() && 0 == floatval( $product->get_price() ) ) {
     162            } elseif ( '' !== $product->get_price() && 0 == floatval( $product->get_price() ) ) { // phpcs:ignore
    161163                $price = '<span class="woocommerce-Price-amount amount">' . esc_html( $free_price_txt ) . '</span>';
    162164            }
     
    209211
    210212                if ( ! empty( $order->get_payment_method() ) ) {
     213                    return;
     214                }
     215
     216                // Update order status for Request Quote
     217                if ( ! empty( $order->get_meta( '_wpowp_order_type', false ) ) && 'quote' === $order->get_meta( '_wpowp_order_type' ) ) {
     218                    if ( 'pending' !== $order_status && 'completed' !== $order_status ) {
     219
     220                        $option_quote_status = \WPOWP\WPOWP_Admin::get_instance()->get_settings( 'order_status_quote' );
     221                        // Update Order status
     222                        $order->update_status( $option_quote_status );
     223                        // Delete the custom meta after status update
     224                        $order->delete_meta_data( '_wpowp_order_type' );
     225                        $order->save();
     226                    }
    211227                    return;
    212228                }
     
    422438
    423439        public function hide_prices_sitewide__premium_or_trial_only() {
    424            
     440
    425441            // if Checkout ordr pay then dont hide totals
    426             if ( isset( $_GET['pay_for_order'] ) && 'true' === sanitize_text_field( $_GET['pay_for_order'] ) ) {
     442            if ( isset( $_GET['pay_for_order'] ) && 'true' === sanitize_text_field( $_GET['pay_for_order'] ) ) { // phpcs:ignore
    427443                return;
    428444            }
     
    463479
    464480        // Remove price/subtotal columns from cart table
    465         public function remove_price_columns_cart( $product_name, $cart_item, $cart_item_key ) {
     481        public function remove_price_columns_cart( $product_name, $cart_item, $cart_item_key ) { // phpcs:ignore
    466482            // Just return name without extra price info
    467483            return $product_name;
     
    469485
    470486        // Remove price/subtotal columns from checkout table
    471         public function remove_price_columns_checkout( $quantity_html, $cart_item, $cart_item_key ) {
     487        public function remove_price_columns_checkout( $quantity_html, $cart_item, $cart_item_key ) { // phpcs:ignore
    472488            // Return just quantity
    473489            return $quantity_html;
     
    546562            return array();
    547563        }
     564
     565        /**
     566         * Add quote order meta
     567         *
     568         * @params object $order
     569         * @params array $data
     570         * @return void
     571         * @since 2.7.4
     572         */
     573        public function add_quote_order_meta( $order, $data ) { // phpcs:ignore                     
     574            if ( isset( $_POST['wpowp_order_type'] ) && "quote" === $_POST['wpowp_order_type'] ) { // phpcs:ignore
     575                $order->add_meta_data( '_wpowp_order_type', 'quote' );
     576            }
     577        }
    548578    }
    549579
  • wc-place-order-without-payment/trunk/inc/WPOWP_Rest_API.php

    r3247774 r3388594  
    251251
    252252            $posted_data = $request->get_params();
    253             $tyrules     = isset( $posted_data['rules'] ) ? $posted_data['rules'] : '';
     253            $tyrules     = isset( $posted_data['rules'] ) ? $posted_data['rules'] : '';         
    254254
    255255            update_option( $this->option, $tyrules );
  • wc-place-order-without-payment/trunk/languages/wpowp.pot

    r3315539 r3388594  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Place Order Without Payment for WooCommerce 2.7.0\n"
     5"Project-Id-Version: Place Order Without Payment for WooCommerce 2.7.4\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-place-order-without-payment\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-05-24T20:58:48+05:30\n"
     12"POT-Creation-Date: 2025-10-28T09:43:21+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.11.0\n"
     14"X-Generator: WP-CLI 2.12.0\n"
    1515"X-Domain: wpowp\n"
    1616
     
    9292msgstr ""
    9393
    94 #: inc/Modules/Rules.php:25
     94#: inc/Modules/Rules.php:30
    9595msgid "Product "
    9696msgstr ""
    9797
    98 #: inc/Modules/Rules.php:26
     98#: inc/Modules/Rules.php:31
    9999msgid "Product Variation"
    100100msgstr ""
    101101
    102 #: inc/Modules/Rules.php:27
     102#: inc/Modules/Rules.php:32
    103103msgid "Product Category"
    104104msgstr ""
    105105
    106 #: inc/Modules/Rules.php:28
     106#: inc/Modules/Rules.php:33
    107107msgid "Product Tag"
    108108msgstr ""
    109109
    110 #: inc/Modules/Rules.php:31
     110#: inc/Modules/Rules.php:36
    111111msgid "User Role "
    112112msgstr ""
    113113
    114 #: inc/Modules/Rules.php:39
    115 #: inc/Modules/Rules.php:47
     114#: inc/Modules/Rules.php:44
     115#: inc/Modules/Rules.php:52
    116116msgid "Includes"
    117117msgstr ""
    118118
    119 #: inc/Modules/Rules.php:40
    120 #: inc/Modules/Rules.php:48
     119#: inc/Modules/Rules.php:45
     120#: inc/Modules/Rules.php:53
    121121msgid "Does Not Include"
    122122msgstr ""
    123123
    124 #: inc/Modules/Rules.php:45
     124#: inc/Modules/Rules.php:50
     125#: inc/Modules/Rules.php:62
     126msgid "Is"
     127msgstr ""
     128
     129#: inc/Modules/Rules.php:51
     130#: inc/Modules/Rules.php:63
     131msgid "Is Not"
     132msgstr ""
     133
     134#: inc/Modules/Rules.php:56
     135#: inc/Modules/Rules.php:66
     136#: inc/Modules/Rules.php:75
     137msgid "Equals"
     138msgstr ""
     139
    125140#: inc/Modules/Rules.php:57
    126 msgid "Is"
    127 msgstr ""
    128 
    129 #: inc/Modules/Rules.php:46
     141#: inc/Modules/Rules.php:67
     142#: inc/Modules/Rules.php:76
     143msgid "Not Equals"
     144msgstr ""
     145
    130146#: inc/Modules/Rules.php:58
    131 msgid "Is Not"
    132 msgstr ""
    133 
    134 #: inc/Modules/Rules.php:51
    135 #: inc/Modules/Rules.php:61
    136 #: inc/Modules/Rules.php:70
    137 msgid "Equals"
    138 msgstr ""
    139 
    140 #: inc/Modules/Rules.php:52
    141 #: inc/Modules/Rules.php:62
     147msgid "Greater Than"
     148msgstr ""
     149
     150#: inc/Modules/Rules.php:59
     151msgid "Less Than"
     152msgstr ""
     153
     154#: inc/Modules/Rules.php:68
     155msgid "Contains"
     156msgstr ""
     157
    142158#: inc/Modules/Rules.php:71
    143 msgid "Not Equals"
    144 msgstr ""
    145 
    146 #: inc/Modules/Rules.php:53
    147 msgid "Greater Than"
    148 msgstr ""
    149 
    150 #: inc/Modules/Rules.php:54
    151 msgid "Less Than"
    152 msgstr ""
    153 
    154 #: inc/Modules/Rules.php:63
    155 msgid "Contains"
    156 msgstr ""
    157 
    158 #: inc/Modules/Rules.php:66
    159159#: templates/admin/settings.php:133
    160160#: templates/admin/settings.php:144
     
    168168msgstr ""
    169169
    170 #: inc/Modules/Rules.php:67
     170#: inc/Modules/Rules.php:72
    171171#: templates/admin/settings.php:132
    172172#: templates/admin/settings.php:143
     
    180180msgstr ""
    181181
    182 #: inc/Modules/Rules.php:72
     182#: inc/Modules/Rules.php:77
    183183msgid "After"
    184184msgstr ""
    185185
    186 #: inc/Modules/Rules.php:73
     186#: inc/Modules/Rules.php:78
    187187msgid "Before"
    188188msgstr ""
    189189
    190190#: inc/WPOWP_Admin.php:82
    191 #: inc/WPOWP_Front.php:124
     191#: inc/WPOWP_Front.php:126
    192192msgid "Buy Now"
    193193msgstr ""
    194194
    195195#: inc/WPOWP_Admin.php:86
    196 #: inc/WPOWP_Front.php:140
     196#: inc/WPOWP_Front.php:142
    197197msgid "FREE"
    198198msgstr ""
     
    203203
    204204#: inc/WPOWP_Admin.php:94
    205 #: inc/WPOWP_Front.php:252
    206 #: wc-place-order-without-payment.php:145
     205#: inc/WPOWP_Front.php:268
     206#: wc-place-order-without-payment.php:150
    207207msgid "Place Order"
    208208msgstr ""
    209209
    210 #: inc/WPOWP_Admin.php:153
     210#: inc/WPOWP_Admin.php:154
    211211msgid "Invalid path"
    212212msgstr ""
    213213
    214 #: inc/WPOWP_Admin.php:240
     214#: inc/WPOWP_Admin.php:241
    215215msgid "Add Rule"
    216216msgstr ""
    217217
    218 #: inc/WPOWP_Admin.php:274
     218#: inc/WPOWP_Admin.php:275
    219219msgid "Like Place Order Without Payment? Give it a"
    220220msgstr ""
    221221
    222 #: inc/WPOWP_Admin.php:278
     222#: inc/WPOWP_Admin.php:279
    223223msgid "★★★★★"
    224224msgstr ""
    225225
    226 #: inc/WPOWP_Admin.php:278
     226#: inc/WPOWP_Admin.php:279
    227227msgid " rating. A huge thanks in advance!"
    228228msgstr ""
    229229
    230 #: inc/WPOWP_Admin.php:294
     230#: inc/WPOWP_Admin.php:295
    231231msgid "Version "
    232232msgstr ""
     
    252252#: templates/admin/header.php:9
    253253#: templates/admin/settings.php:12
    254 #: wc-place-order-without-payment.php:226
     254#: wc-place-order-without-payment.php:231
    255255msgid "Settings"
    256256msgstr ""
     
    266266
    267267#: templates/admin/header.php:18
    268 #: templates/admin/rules.php:73
     268#: templates/admin/rules.php:80
    269269msgid "Request Quote"
    270270msgstr ""
     
    292292
    293293#: templates/admin/quote-only.php:37
    294 #: templates/admin/quote-only.php:119
     294#: templates/admin/quote-only.php:137
    295295msgid "Hide Place Order Button"
    296296msgstr ""
    297297
    298298#: templates/admin/quote-only.php:47
    299 #: templates/admin/quote-only.php:128
     299#: templates/admin/quote-only.php:146
    300300msgid "( Hide Place Order Button )"
    301301msgstr ""
     
    310310
    311311#: templates/admin/quote-only.php:70
    312 #: templates/admin/quote-only.php:150
    313 #: templates/admin/quote-only.php:162
     312#: templates/admin/quote-only.php:168
     313#: templates/admin/settings.php:39
     314msgid "Order Status"
     315msgstr ""
     316
     317#: templates/admin/quote-only.php:83
     318#: templates/admin/quote-only.php:181
     319msgid "( Order status after request quote )"
     320msgstr ""
     321
     322#: templates/admin/quote-only.php:88
     323#: templates/admin/quote-only.php:186
     324#: templates/admin/quote-only.php:198
    314325msgid "Quote Only Button Position"
    315326msgstr ""
    316327
    317 #: templates/admin/quote-only.php:74
    318 #: templates/admin/quote-only.php:154
    319 #: templates/admin/quote-only.php:166
     328#: templates/admin/quote-only.php:92
     329#: templates/admin/quote-only.php:190
     330#: templates/admin/quote-only.php:202
    320331msgid "After Payment Button"
    321332msgstr ""
    322333
    323 #: templates/admin/quote-only.php:75
    324 #: templates/admin/quote-only.php:155
    325 #: templates/admin/quote-only.php:167
     334#: templates/admin/quote-only.php:93
     335#: templates/admin/quote-only.php:191
     336#: templates/admin/quote-only.php:203
    326337msgid "Before Payment Button"
    327338msgstr ""
    328339
    329 #: templates/admin/quote-only.php:77
    330 #: templates/admin/quote-only.php:157
    331 #: templates/admin/quote-only.php:169
     340#: templates/admin/quote-only.php:95
     341#: templates/admin/quote-only.php:193
     342#: templates/admin/quote-only.php:205
    332343msgid "( Where to place Quote Only button )"
    333344msgstr ""
    334345
    335 #: templates/admin/quote-only.php:81
     346#: templates/admin/quote-only.php:99
    336347msgid "Quote Button Text"
    337348msgstr ""
    338349
    339 #: templates/admin/quote-only.php:90
     350#: templates/admin/quote-only.php:108
    340351msgid "( Text for Quote button )"
    341352msgstr ""
    342353
    343 #: templates/admin/quote-only.php:105
     354#: templates/admin/quote-only.php:123
    344355msgid "Quote Only / Request Quote"
    345356msgstr ""
    346357
    347 #: templates/admin/quote-only.php:113
     358#: templates/admin/quote-only.php:131
    348359msgid "( Enable Quote Only button  )"
    349360msgstr ""
    350361
    351 #: templates/admin/quote-only.php:134
     362#: templates/admin/quote-only.php:152
    352363msgid "Hide Price Sitewide"
    353364msgstr ""
    354365
    355 #: templates/admin/quote-only.php:143
     366#: templates/admin/quote-only.php:161
    356367msgid "( Hide Price Sitewide )"
    357368msgstr ""
    358369
    359 #: templates/admin/quote-only.php:174
     370#: templates/admin/quote-only.php:210
    360371msgid "When clicked it collapses payment methods. Ignores shipping and pushes order through without payment or shipping simply as a quote request."
    361372msgstr ""
    362373
    363 #: templates/admin/quote-only.php:184
     374#: templates/admin/quote-only.php:220
    364375#: templates/admin/settings.php:350
    365376msgid "Save Changes"
    366377msgstr ""
    367378
    368 #: templates/admin/quote-only.php:190
     379#: templates/admin/quote-only.php:226
    369380#: templates/admin/rules.php:37
    370381#: templates/admin/settings.php:236
     
    372383msgstr ""
    373384
    374 #: templates/admin/quote-only.php:193
     385#: templates/admin/quote-only.php:229
    375386msgid "to avail the Request Quote feature"
    376387msgstr ""
     
    385396
    386397#: templates/admin/rules.php:66
    387 #: wc-place-order-without-payment.php:144
     398#: wc-place-order-without-payment.php:149
    388399msgid "Place Order Without Payment"
    389400msgstr ""
    390401
    391 #: templates/admin/rules.php:80
     402#: templates/admin/rules.php:73
     403msgid "Allow Payment Gateways"
     404msgstr ""
     405
     406#: templates/admin/rules.php:87
    392407msgid "Custom Order Button Text"
    393408msgstr ""
    394409
    395 #: templates/admin/rules.php:87
     410#: templates/admin/rules.php:94
    396411msgid "Remove shipping fields, rates"
    397412msgstr ""
    398413
    399 #: templates/admin/rules.php:94
     414#: templates/admin/rules.php:101
    400415msgid "Remove Tax rates"
    401416msgstr ""
    402417
    403 #: templates/admin/rules.php:101
     418#: templates/admin/rules.php:108
    404419#: templates/admin/settings.php:150
    405420#: templates/admin/settings.php:277
     
    407422msgstr ""
    408423
    409 #: templates/admin/rules.php:108
     424#: templates/admin/rules.php:115
    410425msgid "Remove checkout terms"
    411426msgstr ""
    412427
    413 #: templates/admin/rules.php:116
     428#: templates/admin/rules.php:123
    414429msgid "Order Approval"
    415430msgstr ""
    416431
    417 #: templates/admin/rules.php:126
     432#: templates/admin/rules.php:133
    418433msgid "Add Condition"
    419434msgstr ""
    420435
    421 #: templates/admin/rules.php:149
     436#: templates/admin/rules.php:156
    422437msgid "Select a value"
    423438msgstr ""
    424439
    425 #: templates/admin/rules.php:156
     440#: templates/admin/rules.php:163
    426441msgid "Select multiple values"
    427442msgstr ""
    428443
    429 #: templates/admin/rules.php:164
     444#: templates/admin/rules.php:171
    430445msgid " and "
    431446msgstr ""
    432447
    433 #: templates/admin/rules.php:165
     448#: templates/admin/rules.php:172
    434449msgid " or "
    435450msgstr ""
     
    437452#: templates/admin/settings.php:32
    438453msgid "( Enable Place Order Without Payment store-wide in WooCommerce )"
    439 msgstr ""
    440 
    441 #: templates/admin/settings.php:39
    442 msgid "Order Status"
    443454msgstr ""
    444455
     
    572583msgstr ""
    573584
    574 #: templates/emails/pending-payment-notification.php:16
     585#. translators: %s is the customer's billing first name.
     586#: templates/emails/pending-payment-notification.php:19
    575587#: templates/emails/plain/pending-payment-notification.php:13
     588#, php-format
    576589msgid "Dear %s,"
    577590msgstr ""
    578591
    579 #: templates/emails/pending-payment-notification.php:21
     592#. translators: 1: site name, 2: order ID, 3: formatted order date.
     593#: templates/emails/pending-payment-notification.php:28
    580594#: templates/emails/plain/pending-payment-notification.php:17
     595#, php-format
    581596msgid "Thank you for your recent purchase at %1$s. We wanted to inform you that the status of your order #%2$d, placed on %3$s, has been updated to \"Pending\"."
    582597msgstr ""
    583598
    584 #: templates/emails/pending-payment-notification.php:29
     599#: templates/emails/pending-payment-notification.php:36
    585600#: templates/emails/plain/pending-payment-notification.php:24
    586601msgid "What does this mean?"
    587602msgstr ""
    588603
    589 #: templates/emails/pending-payment-notification.php:31
     604#: templates/emails/pending-payment-notification.php:38
    590605msgid "Your order is awaiting payment."
    591606msgstr ""
    592607
    593 #: templates/emails/pending-payment-notification.php:32
     608#: templates/emails/pending-payment-notification.php:39
    594609msgid "Please complete your payment to proceed with the order."
    595610msgstr ""
    596611
    597 #: templates/emails/pending-payment-notification.php:43
     612#: templates/emails/pending-payment-notification.php:50
    598613#: templates/emails/plain/pending-payment-notification.php:35
    599614msgid "Order Summary:"
    600615msgstr ""
    601616
    602 #: templates/emails/pending-payment-notification.php:45
     617#. translators: %d is the order ID number.
     618#: templates/emails/pending-payment-notification.php:55
    603619#: templates/emails/plain/pending-payment-notification.php:36
     620#, php-format
    604621msgid "Order Number: %d"
    605622msgstr ""
    606623
    607 #: templates/emails/pending-payment-notification.php:46
     624#. translators: %s is the formatted order creation date.
     625#: templates/emails/pending-payment-notification.php:60
    608626#: templates/emails/plain/pending-payment-notification.php:37
     627#, php-format
    609628msgid "Order Date: %s"
    610629msgstr ""
    611630
    612 #: templates/emails/pending-payment-notification.php:47
     631#. translators: %s is the formatted order total amount (including currency).
     632#: templates/emails/pending-payment-notification.php:65
    613633#: templates/emails/plain/pending-payment-notification.php:38
     634#, php-format
    614635msgid "Order Total: %s"
    615636msgstr ""
    616637
    617 #: templates/emails/pending-payment-notification.php:52
     638#: templates/emails/pending-payment-notification.php:71
    618639msgid "To complete your order, please click the link below to make the payment:"
    619640msgstr ""
    620641
    621 #: templates/emails/pending-payment-notification.php:56
     642#: templates/emails/pending-payment-notification.php:75
    622643msgid "Pay Now"
    623644msgstr ""
    624645
    625 #: templates/emails/pending-payment-notification.php:61
     646#: templates/emails/pending-payment-notification.php:80
    626647#: templates/emails/plain/pending-payment-notification.php:46
    627648msgid "If you have already made the payment or believe this status change is in error, please contact our support team:"
    628649msgstr ""
    629650
    630 #: templates/emails/pending-payment-notification.php:66
     651#. translators: 1: admin email address, 2: WooCommerce store phone number.
     652#: templates/emails/pending-payment-notification.php:86
    631653#: templates/emails/plain/pending-payment-notification.php:48
     654#, php-format
    632655msgid "Email: %1$s | Phone: %2$s"
    633656msgstr ""
     
    645668msgstr ""
    646669
    647 #: wc-place-order-without-payment.php:146
     670#: wc-place-order-without-payment.php:151
    648671msgid "Error Processing data!"
    649672msgstr ""
    650673
    651 #: wc-place-order-without-payment.php:147
     674#: wc-place-order-without-payment.php:152
    652675msgid "This action is not recoverable. Are you sure you want to reset this setting?"
    653676msgstr ""
    654677
    655 #: wc-place-order-without-payment.php:227
     678#: wc-place-order-without-payment.php:232
    656679msgid "Support Desk"
    657680msgstr ""
    658681
    659682#. translators: 1$-2$: opening and closing <strong> tags, 3$-4$: link tags, takes to woocommerce plugin on wp.org, 5$-6$: opening and closing link tags, leads to plugins.php in admin.
    660 #: wc-place-order-without-payment.php:253
     683#: wc-place-order-without-payment.php:258
     684#, php-format
    661685msgid "%1$sPlace Order without payment for WooCommerce is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for Place Order without payment for WooCommerce to work. Please %5$sinstall & activate WooCommerce &raquo;%6$s"
    662686msgstr ""
    663687
    664 #: wc-place-order-without-payment.php:403
     688#: wc-place-order-without-payment.php:413
    665689msgid "Quote Only"
    666690msgstr ""
    667691
    668 #: wc-place-order-without-payment.php:512
     692#. translators: 1: opening <strong> tag, 2: closing </strong> tag, 5: opening <a> tag linking to documentation, 6: closing </a> tag.
     693#: wc-place-order-without-payment.php:524
     694#, php-format
    669695msgid "Place Order without payment for WooCommerce requires Classic Checkout.The %1$s[woocommerce_checkout]%2$s shortcode must be placed on Checkout page. Read documentation %5$sNo Payment Method Provided Error%6$s here."
    670696msgstr ""
  • wc-place-order-without-payment/trunk/readme.txt

    r3364817 r3388594  
    55Requires at least: 6.2
    66Tested up to: 6.8
    7 Stable tag: 2.7.3
    8 Version: 2.7.3
     7Stable tag: 2.7.4
     8Version: 2.7.4
    99Requires PHP: 7.4
    1010License: GPLv2 or later
     
    142142
    143143== Changelog ==
     144** V 2.7.4 **
     145* Package Update
     146* Added default order status for Request Quote
     147* Allow Payment Gateways in RULEs
    144148** V 2.7.3 **
    145149* SDK Update
     
    210214== Upgrade Notice ==
    211215
    212 = 2.7.3 =
    213 * SDK Update
     216= 2.7.4 =
     217* Allow Payment Gateways in RULEs + Default order status for Request Quote
  • wc-place-order-without-payment/trunk/templates/admin/quote-only.php

    r3315539 r3388594  
    6868                <tr>
    6969                    <th scope="row"><label
     70                            for="wpowp_order_status_quote"><?php esc_html_e( 'Order Status', 'wpowp' ); ?></label>
     71                    </th>
     72                    <td>                   
     73                        <select class="regular-text wc-enhanced-select" name="wpowp_order_status_quote" id="wpowp_order_status_quote">
     74                            <?php
     75                            if ( ! empty( $this->order_status_list() ) ) {
     76                                $status_list = $this->order_status_list(); //phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
     77                                foreach ( $status_list as $key => $label ) {
     78                                    echo '<option value="' . wp_kses_post( $key ) . '" ' . ( $key === $option['order_status_quote'] ? 'selected' : '' ) . '>' . wp_kses_post( $label ) . '</option>';
     79                                }
     80                            }
     81                            ?>
     82                        </select>
     83                        <p><?php esc_html_e( '( Order status after request quote )', 'wpowp' ); ?></p>
     84                    </td>
     85                </tr>
     86                <tr>
     87                    <th scope="row"><label
    7088                            for="wpowp_quote_button_postion"><?php esc_html_e( 'Quote Only Button Position', 'wpowp' ); ?></label>
    7189                    </th>
     
    7795                        <p><?php esc_html_e( '( Where to place Quote Only button )', 'wpowp' ); ?></p>
    7896                    </td>
    79                 </tr>
     97                </tr>               
    8098                <tr>
    8199                    <th scope="row"><?php esc_html_e( 'Quote Button Text', 'wpowp' ); ?></th>
     
    148166                <tr>
    149167                    <th scope="row"><label
     168                            for="wpowp_order_status_quote"><?php esc_html_e( 'Order Status', 'wpowp' ); ?></label>
     169                    </th>
     170                    <td>                   
     171                        <select class="regular-text wc-enhanced-select" name="wpowp_order_status_quote" id="wpowp_order_status_quote">
     172                            <?php
     173                            if ( ! empty( $this->order_status_list() ) ) {
     174                                $status_list = $this->order_status_list(); //phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
     175                                foreach ( $status_list as $key => $label ) {
     176                                    echo '<option value="' . wp_kses_post( $key ) . '" ' . ( $key === $option['order_status_quote'] ? 'selected' : '' ) . '>' . wp_kses_post( $label ) . '</option>';
     177                                }
     178                            }
     179                            ?>
     180                        </select>
     181                        <p><?php esc_html_e( '( Order status after request quote )', 'wpowp' ); ?></p>
     182                    </td>
     183                </tr>
     184                <tr>
     185                    <th scope="row"><label
    150186                            for="wpowp_quote_button_postion"><?php esc_html_e( 'Quote Only Button Position', 'wpowp' ); ?></label>
    151187                    </th>
     
    157193                        <p><?php esc_html_e( '( Where to place Quote Only button )', 'wpowp' ); ?></p>
    158194                    </td>
    159                 </tr>
     195                </tr>               
    160196                <tr>
    161197                    <th scope="row"><label
  • wc-place-order-without-payment/trunk/templates/admin/rules.php

    r3315539 r3388594  
    6565                        title="<?php echo esc_attr( 'Toggle to enable or disable Place Order Without Payment.', 'wpowp' ); ?>" />
    6666                    <label for="placeOrderSwitch"><?php esc_html_e( 'Place Order Without Payment', 'wpowp' ); ?></label>
     67                </div>
     68
     69                <!-- Allow Payment Gateways Switch -->
     70                <div class="col">
     71                    <input class="my-1 allowPaymentsSwitch" type="checkbox" id="allowPaymentsSwitch" name="allowPaymentsSwitch" value="1"
     72                        title="<?php echo esc_attr( 'Toggle to enable Payment Gateways.', 'wpowp' ); ?>" />
     73                    <label for="allowPaymentsSwitch"><?php esc_html_e( 'Allow Payment Gateways', 'wpowp' ); ?></label>
    6774                </div>
    6875
  • wc-place-order-without-payment/trunk/templates/emails/pending-payment-notification.php

    r3218921 r3388594  
    1414?>
    1515
    16 <p><?php printf( esc_html__( 'Dear %s,', 'wpowp' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
     16<p>
     17    <?php
     18        // translators: %s is the customer's billing first name.
     19        printf( esc_html__( 'Dear %s,', 'wpowp' ), esc_html( $order->get_billing_first_name() ) );
     20    ?>
     21</p>
    1722
    1823<p>
    1924    <?php
    20     printf(
    21         esc_html__( 'Thank you for your recent purchase at %1$s. We wanted to inform you that the status of your order #%2$d, placed on %3$s, has been updated to "Pending".', 'wpowp' ),
    22         esc_html( get_bloginfo( 'name' ) ),
    23         esc_html( $order->get_id() ),
    24         esc_html( wc_format_datetime( $order->get_date_created() ) )
    25     );
    26     ?>
     25       
     26        printf(
     27            // translators: 1: site name, 2: order ID, 3: formatted order date.
     28            esc_html__( 'Thank you for your recent purchase at %1$s. We wanted to inform you that the status of your order #%2$d, placed on %3$s, has been updated to "Pending".', 'wpowp' ),
     29            esc_html( get_bloginfo( 'name' ) ),
     30            esc_html( $order->get_id() ),
     31            esc_html( wc_format_datetime( $order->get_date_created() ) )
     32        );
     33        ?>
    2734</p>
    2835
     
    4350<h3><?php esc_html_e( 'Order Summary:', 'wpowp' ); ?></h3>
    4451<p>
    45     <?php printf( esc_html__( 'Order Number: %d', 'wpowp' ), esc_html( $order->get_id() ) ); ?><br>
    46     <?php printf( esc_html__( 'Order Date: %s', 'wpowp' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) ); ?><br>
    47     <?php printf( esc_html__( 'Order Total: %s', 'wpowp' ), esc_html( $formatted_order_total ) ); ?>
     52   
     53    <?php
     54        // translators: %d is the order ID number.
     55        printf( esc_html__( 'Order Number: %d', 'wpowp' ), esc_html( $order->get_id() ) );
     56    ?>
     57        <br>
     58    <?php
     59        // translators: %s is the formatted order creation date.
     60        printf( esc_html__( 'Order Date: %s', 'wpowp' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) );
     61    ?>
     62        <br>
     63    <?php
     64        // translators: %s is the formatted order total amount (including currency).
     65        printf( esc_html__( 'Order Total: %s', 'wpowp' ), esc_html( $formatted_order_total ) );
     66    ?>
    4867</p>
    4968
     
    6281</p>
    6382<p>
    64     <?php
     83    <?php   
    6584    printf(
     85        // translators: 1: admin email address, 2: WooCommerce store phone number.
    6686        esc_html__( 'Email: %1$s | Phone: %2$s', 'wpowp' ),
    6787        esc_html( get_option( 'admin_email' ) ),
  • wc-place-order-without-payment/trunk/wc-place-order-without-payment.php

    r3368801 r3388594  
    1717 * Plugin URI:        https://nitin247.com/plugin/woocommerce-place-order-without-payment/
    1818 * Description:       Place Order Without Payment for WooCommerce will allow users to place orders directly.This plugin will customize checkout page and offers to direct place order without payment.
    19  * Version:           2.7.3
     19 * Version:           2.7.4
    2020 * Author:            Nitin Prakash
    2121 * Author URI:        https://nitin247.com/
     
    2828 * Tested up to: 6.8
    2929 * WC requires at least: 8.2
    30  * WC tested up to: 10.2
     30 * WC tested up to: 10.3
    3131 * Requires Plugins:  woocommerce
    3232 */
     
    4545use WPOWP\Modules\Rules as WPOWP_Rules;
    4646use WPOWP\Traits\Get_Instance;
    47 defined( 'WPOWP_VERSION' ) or define( 'WPOWP_VERSION', '2.7.3' );
     47defined( 'WPOWP_VERSION' ) or define( 'WPOWP_VERSION', '2.7.4' );
    4848defined( 'WPOWP_FILE' ) or define( 'WPOWP_FILE', __FILE__ );
    4949defined( 'WPOWP_BASE' ) or define( 'WPOWP_BASE', plugin_basename( WPOWP_FILE ) );
     
    235235            // Determine whether to disable payment
    236236            $skip_payment = !empty( $process_rules ) && $process_rules['placeOrderSwitch'];
     237            $allow_payments = !empty( $process_rules ) && $process_rules['allowPaymentsSwitch'];
    237238            // Disable payment if necessary
    238239            if ( $enabled_sitewide ) {
     
    240241            }
    241242            if ( wpowp_fs()->is_paying_or_trial() ) {
     243                // Allow payments as per Rules
     244                if ( $allow_payments ) {
     245                    return;
     246                }
    242247                // Disable payment if necessary for premium version
    243248                if ( $skip_payment ) {
     
    352357                echo '<span class="wpowp-quote-only-label">' . esc_html( $quote_btn_label ) . '</span>';
    353358            }
     359            echo '<input id="wpowp-order-type" type="hidden" name="wpowp_order_type" value="no" />';
    354360            echo '<button type="submit" id="wpowp-quote-only" class="button wpowp-quote-only" href="#" onclick="wpowp_remove_payment_methods();">' . esc_html( $quote_btn_text ) . '</button>';
    355361            // Remove WC Payment Methods on Quote Order Click
    356             echo '<script>function wpowp_remove_payment_methods(){ jQuery( ".wc_payment_methods, .payment_methods" ).remove(); }</script>';
     362            echo '<script>function wpowp_remove_payment_methods(){ jQuery( "#wpowp-order-type" ).val( "quote" ); console.log( jQuery( "#wpowp-order-type" ).val() ) /* jQuery( ".wc_payment_methods, .payment_methods" ).remove(); */ }</script>';
    357363        }
    358364
     
    443449            $document_url = 'https://nitin247.com/docs/place-order-without-payment/no-payment-method-provided-error/?utm_source=wpowp&utm_campaign=wp-install&utm_medium=plugin&utm_term=WPOWP';
    444450            echo '<div class="notice notice-error is-dismissible"><p>';
     451            // translators: 1: opening <strong> tag, 2: closing </strong> tag, 5: opening <a> tag linking to documentation, 6: closing </a> tag.
    445452            printf(
    446453                esc_html__( 'Place Order without payment for WooCommerce requires Classic Checkout.The %1$s[woocommerce_checkout]%2$s shortcode must be placed on Checkout page. Read documentation %5$sNo Payment Method Provided Error%6$s here.', 'wpowp' ),
Note: See TracChangeset for help on using the changeset viewer.