Plugin Directory

Changeset 2766148


Ignore:
Timestamp:
08/04/2022 04:10:10 AM (4 years ago)
Author:
ncstudio
Message:

2.5.11

Location:
studiocart
Files:
711 added
8 edited

Legend:

Unmodified
Added
Removed
  • studiocart/trunk/README.txt

    r2764768 r2766148  
    7777
    7878== Changelog ==
     79
     80= 2.5.11 =
     81* New: Order received email for COD orders
     82* Update: "tab: shortcode attribute to display my account tabs separately
     83* Update: Hide subscriptions cancellation setting when creating installment plans
     84* Fix: Incorrect order amount formatting in CSV export when using 0 decimal places
    7985
    8086= 2.5.10 =
  • studiocart/trunk/admin/class-ncs-cart-metaboxes.php

    r2764768 r2766148  
    22332233            'class'       => 'widefat',
    22342234            'description' => '',
     2235            'id'          => '_sc_disable_pending_email',
     2236            'label'       => __( 'Disable Order Received Confirmation email', 'ncs-cart' ),
     2237            'placeholder' => '',
     2238            'type'        => 'checkbox',
     2239            'value'       => '',
     2240            'class_size'  => '',
     2241        ),
     2242            array(
     2243            'class'       => 'widefat',
     2244            'description' => '',
    22352245            'id'          => '_sc_disable_welcome_email',
    22362246            'label'       => __( 'Disable New User Welcome email', 'ncs-cart' ),
     
    34713481                'field' => 'product_type',
    34723482                'value' => 'recurring',
     3483            ), array(
     3484                'field' => 'installments',
     3485                'value' => '-1',
    34733486            ) ),
    34743487            ),
  • studiocart/trunk/admin/class-ncs-cart-settings.php

    r2764768 r2766148  
    382382    public function register_email_tab_section(){
    383383        $emails = array(  'email_settings'=>'Settings',
     384                                'emailtemplate_pending'=> esc_html__('Order Received Confirmation', 'ncs-cart' ),
    384385                                'emailtemplate_purchase'=> esc_html__('Purchase Confirmation', 'ncs-cart' ),
    385386                                'emailtemplate_registration'=>esc_html__('New User Welcome', 'ncs-cart' ),
     
    607608                        <select id="sc-email-type">
    608609                            <option value="confirmation">'.__('-- Select --', 'ncs-cart').'</option>
     610                            <option value="pending">'.__('Order Received', 'ncs-cart').'</option>
    609611                            <option value="registration">'.__('New User Welcome', 'ncs-cart').'</option>
    610612                            <option value="confirmation">'.__('Purchase Confirmation', 'ncs-cart').'</option>
     
    622624                    'tab'=>'email'
    623625                ),
     626            ),
     627            'emailtemplate_pending' => array(
     628                'order_pending_enable' => array(
     629                    'type'          => 'checkbox',
     630                    'label'         => esc_html__( 'Enable', 'ncs-cart' ),
     631                    'settings'      => array(
     632                        'id'            => '_sc_email_pending_enable',
     633                        'value'         => '',
     634                        'description'   => '',
     635                    ),
     636                    'tab'=>'email'
     637                ),
     638                'order_pending_subject' => array(
     639                    'type'          => 'text',
     640                    'label'         => esc_html__( 'Subject', 'ncs-cart' ),
     641                    'settings'      => array(
     642                        'id'            => '_sc_email_pending_subject',
     643                        'value'         => 'Your order received confirmation from {site_name}',
     644                        'description'   => '',
     645                        'placeholder'   => ''
     646                    ),
     647                    'tab'=>'email'
     648                ),
     649                'order_pending_email_admin' => array(
     650                    'type'          => 'checkbox',
     651                    'label'         => esc_html__( 'Send to admin?', 'ncs-cart' ),
     652                    'settings'      => array(
     653                        'id'            => '_sc_email_pending_admin',
     654                        'value'         => '',
     655                        'description'   => '',
     656                    ),
     657                    'tab'=>'email'
     658                ),
     659                'order_pending_headline' => array(
     660                    'type'          => 'text',
     661                    'label'         => esc_html__( 'Headline', 'ncs-cart' ),
     662                    'settings'      => array(
     663                        'id'            => '_sc_email_pending_headline',
     664                        'value'         => '',
     665                        'placeholder'   => 'Your order has been received!',
     666                        'description'   => '',
     667                    ),
     668                    'tab'=>'email'
     669                ),
     670                'order_pending_body' => array(
     671                    'type'          => 'editor',
     672                    'label'         => esc_html__( 'Body Text', 'ncs-cart' ),
     673                    'settings'      => array(
     674                        'id'            => '_sc_email_pending_body',
     675                        'value'         => '',
     676                        'placeholder'   => '',
     677                        'description'   => '',
     678                        'show_tags'     => true,
     679                        'rows'          => 2,
     680
     681                    ),
     682                    'tab'=>'email'
     683                ),           
    624684            ),
    625685            'emailtemplate_purchase' => array(
  • studiocart/trunk/public/class-ncs-cart-public.php

    r2764768 r2766148  
    186186       
    187187        sc_do_integrations( $order_data['product_id'], $order_data, $status );
    188         studiocart_notification_send( $status, $order_data['ID'] );
     188       
    189189        if ( $status == 'pending' ) {
    190190            sc_do_notifications( $order_data );
    191         }
     191            if ( !get_post_meta( $order_data['product_id'], '_sc_disable_pending_email', true ) ) {
     192                studiocart_notification_send( $status, $order_data );
     193            }
     194        } else {
     195            studiocart_notification_send( $status, $order_data['ID'] );
     196        }
     197       
    192198        self::$lastaction = $order_data['product_id'] . ':' . $status;
    193199    }
     
    204210        }
    205211        sc_do_integrations( $order_data['product_id'], $order_data );
    206         sc_do_notifications( $order_data );
     212        if ( $order_data['pay_method'] != 'cod' ) {
     213            sc_do_notifications( $order_data );
     214        }
    207215       
    208216        if ( $order_type != 'bump' ) {
     
    26892697            'show_title' => false,
    26902698            'hide_login' => false,
     2699            'tab'        => '',
    26912700        );
    26922701        $attr = shortcode_atts( $defaults, $attr );
    26932702        $show_title = $attr['show_title'];
     2703        $tab = $attr['tab'];
    26942704        $messages = sc_translate_js( 'ncs-cart-public.js' );
    26952705       
     
    27052715                    return ncs_get_template( 'my-account/subscription', 'detail', $attr );
    27062716                } else {
    2707                     return ncs_get_template( 'my-account/my-account', '', $attr );
     2717                   
     2718                    if ( $tab ) {
     2719                        return '<div class="ncs-my-account">' . ncs_get_template( 'my-account/tabs/' . $tab, '', $attr ) . '</div>';
     2720                    } else {
     2721                        return ncs_get_template( 'my-account/my-account', '', $attr );
     2722                    }
     2723               
    27082724                }
    27092725           
     
    27122728        } else {
    27132729           
    2714             if ( !$attr['hide_login'] || $attr['hide_login'] == 'false' ) {
     2730            if ( !$tab && (!$attr['hide_login'] || $attr['hide_login'] == 'false') ) {
    27152731                $attr['login_url'] = $this->my_account_url;
    27162732                $attr['action'] = $_REQUEST['action'] ?? 'login';
  • studiocart/trunk/public/partials/csv-export.php

    r2764768 r2766148  
    8080                               $refund_amount = array_sum(array_column($refund_logs_entrie, 'amount'));
    8181                               $total_amount = get_post_meta( $post->ID , '_sc_amount', true ) - $refund_amount; 
    82                                $total_amount = number_format($total_amount , 2);
    8382                               $refundedarray[]= $refund_amount;                       
    8483                            }
    8584                        } else {
    86                              $total_amount= number_format( (float) get_post_meta( $post->ID, '_sc_amount', true), 2);
     85                             $total_amount= get_post_meta( $post->ID, '_sc_amount', true);
    8786                        }
    8887                       // $total_amount= number_format( get_post_meta( $post->ID, '_sc_amount', true), 2);
  • studiocart/trunk/public/templates/email/email-main.php

    r2764768 r2766148  
    2020}
    2121   
    22 if($atts['type'] == 'confirmation' || $atts['type'] == 'renewal') {
     22if($atts['type'] == 'confirmation' || $atts['type'] == 'renewal' || $atts['type'] == 'pending') {
    2323    add_action('sc_before_email_footer', 'sc_do_order_table', 10, 2);
    2424}
  • studiocart/trunk/public/templates/template-functions.php

    r2764768 r2766148  
    556556   
    557557    $i = 0;
     558   
    558559    $payment_methods = apply_filters('sc_payment_methods', $payment_methods, $post_id );   
    559560   
     
    570571                <?php elseif(count($payment_methods)==1): ?>
    571572                    <input id="method-<?php echo $method['value']; ?>" checked="checked" type="radio" name="pay-method" value="<?php echo $method['value']; ?>">
    572                     <?php if (isset($method['single_label']) && $method['single_label'] !== false) {
    573                         $label = isset($method['single_label']) ? $method['single_label'] : $method['label'];
     573                    <?php
     574                        $label = (isset($method['single_label']) && $method['single_label'] !== false) ? $method['single_label'] : $method['label'];
    574575                        echo '<label for="method-'.$method['value'].'">'.$label.'</label>';
    575                     } ?>
     576                    ?>
    576577                <?php endif; $i++; ?>
    577578            <?php endforeach; ?>
  • studiocart/trunk/studiocart.php

    r2764768 r2766148  
    1717 * Plugin URI:        https://studiocart.co
    1818 * Description:       Stunning order pages and simplified sales flow creation that helps you sell digital products, programs, and services from your WordPress site.
    19  * Version:           2.5.10
     19 * Version:           2.5.11
    2020 * Author:            N.Creatives
    2121 * Author URI:        https://ncreatives.com
     
    8787     * Rename this for your plugin and update it as you release new versions.
    8888     */
    89     define( 'NCS_CART_VERSION', '2.5.10' );
     89    define( 'NCS_CART_VERSION', '2.5.11' );
    9090    define( 'NCS_CART_BASE_DIR', plugin_dir_path( __FILE__ ) );
    9191    define( 'NCS_CART_BASE_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.