Plugin Directory

Changeset 3037195


Ignore:
Timestamp:
02/17/2024 04:11:46 PM (2 years ago)
Author:
ncstudio
Message:

version 2.6.4

Location:
studiocart
Files:
486 added
7 edited

Legend:

Unmodified
Added
Removed
  • studiocart/trunk/README.txt

    r3025406 r3037195  
    7777
    7878== Changelog ==
     79
     80= 2.6.4 =
     81* New: sc_update_stripe_invoice_during_checkout filter
     82* New: sc_order_summary_item_name filter
     83* Fix: admin CSS conflict with WP Fusion
     84* Fix: Change stripe statement_descriptor_suffix paramter
     85* Fix: Unable to change Stripe card
    7986
    8087= 2.6.3 =
  • studiocart/trunk/admin/class-ncs-cart-settings.php

    r3017279 r3037195  
    17631763                                        'id'            => '_sc_stripe_test_sk',
    17641764                                        'value'         => '',
     1765                                        'description'   => '',
     1766                                    ),
     1767                                    'tab'=>'payment',
     1768                                ),
     1769                                'stripe-inv-webhook-processing' => array(
     1770                                    'type'          => 'checkbox',
     1771                                    'label'         => esc_html__( 'Update subscription payment status in webhook only', 'ncs-cart' ),
     1772                                    'settings'      => array(
     1773                                        'id'            => '_sc_stripe_invoice_webhook_updates_only',
     1774                                        'value'         => '',
    17651775                                        'description'   => '',
    17661776                                    ),
  • studiocart/trunk/admin/css/ncs-cart-admin.css

    r3017279 r3037195  
    10321032  width: 100%;
    10331033}
    1034 .sc-settings-tabs .repeater .wp-editor-wrap .wp-switch-editor,
    1035 .sc-settings-tabs #repeater_sc_order_bump_options .repeater *{
     1034.sc-settings-tabs .repeater .wp-editor-wrap .wp-switch-editor {
    10361035  box-sizing: content-box;
    10371036}
     
    12401239}
    12411240
     1241.sc-settings-tabs #repeater_sc_order_bump_options .repeater * {
     1242  box-sizing: content-box;
     1243}
     1244
    12421245.sc-product-info .postbox {
    12431246  overflow: hidden;
     
    13661369  content: "\f142";
    13671370}
     1371
     1372.studiocart-admin-page .wp-list-table .column-wpf_settings {
     1373  display: none;
     1374}
     1375
     1376@media screen and (max-width: 782px) {
     1377  .studiocart-admin-page .wp-list-table tr {
     1378    position: relative;
     1379  }
     1380  .studiocart-admin-page .wp-list-table td.wpf_settings {
     1381    display: block;
     1382    position: absolute !important;
     1383    padding: 0;
     1384    right: 0;
     1385    top: 7px;
     1386    overflow: visible;
     1387    z-index: 1;
     1388  }
     1389  .studiocart-admin-page .wp-list-table td.wpf_settings .row-actions {
     1390    display: none;
     1391  }
     1392  .studiocart-admin-page .wp-list-table .column-wpf_settings + * {
     1393    display: block !important;
     1394    padding-top: 1em !important;
     1395    padding-bottom: 1em !important;
     1396  }
     1397  .studiocart-admin-page .wp-list-table .column-wpf_settings + * .sorting-indicators {
     1398    float: right;
     1399  }
     1400}
  • studiocart/trunk/admin/scss/ncs-cart-admin.scss

    r3017279 r3037195  
    13511351}
    13521352
     1353.sc-settings-tabs #repeater_sc_order_bump_options .repeater * {
     1354    box-sizing: content-box;
     1355}
     1356
    13531357.sc-product-info {
    13541358   
     
    15061510    }
    15071511}
     1512
     1513// WP Fusion admin styles
     1514.studiocart-admin-page .wp-list-table .column-wpf_settings {
     1515    display: none;
     1516}
     1517@media screen and (max-width: 782px) {
     1518    .studiocart-admin-page .wp-list-table tr {
     1519        position: relative;
     1520    }
     1521    .studiocart-admin-page .wp-list-table td.wpf_settings {
     1522        display: block;
     1523        position: absolute !important;
     1524        padding: 0;
     1525        right: 0;
     1526        top: 7px;
     1527        overflow: visible;
     1528        z-index: 1;
     1529    }
     1530    .studiocart-admin-page .wp-list-table td.wpf_settings .row-actions {
     1531        display: none;
     1532    }
     1533    .studiocart-admin-page .wp-list-table .column-wpf_settings + * {
     1534        display: block !important;
     1535        padding-top: 1em !important;
     1536        padding-bottom: 1em !important;
     1537    }
     1538    .studiocart-admin-page .wp-list-table .column-wpf_settings + * .sorting-indicators {
     1539        float: right;
     1540    }
     1541}
  • studiocart/trunk/models/ScrtOrder.php

    r3025400 r3037195  
    316316  public function store() {
    317317
     318    global $sc_debug_logger;
     319
     320    $bt = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 1);
     321    $caller = array_shift($bt);
     322
     323    $sc_debug_logger->log_debug("ScrtOrder->store() called id: {$this->id}, status: {$this->status}", 0);
     324    $sc_debug_logger->log_debug("File: {$caller['file']}:: {$caller['line']}", 0);
     325
    318326    $og_order = new self($this->id);
     327    $sc_debug_logger->log_debug("ScrtOrder copy set id: {$og_order->id}, status: {$og_order->status}", 0);
     328
    319329    if($this->subscription_id) {
    320330        $this->check_first_order();
     
    327337      $this->id = self::update($this);
    328338      $status = __('Order status updated from ' .$og_order->status. ' to '. $this->status, 'ncs-cart');
     339      $sc_debug_logger->log_debug("updating ScrtOrder {$this->id}", 0);
    329340    } else {
    330341      if(!$this->invoice_number){
     
    333344      $this->id = self::create($this);
    334345      $status = __('Creating order.', 'ncs-cart');
     346      $sc_debug_logger->log_debug("saved ScrtOrder, new id: {$this->id}", 0);
    335347    }
    336348     
     
    340352   
    341353    if( !$og_order->id && $this->id || ($og_order->id && $og_order->status != $this->status) ) {
     354     
     355      $sc_debug_logger->log_debug("triggering {$this->status} integrations for ScrtOrder {$this->id}", 0);
     356
    342357      sc_log_entry($this->id, $status);
    343358      sc_trigger_integrations($this->status, $this->id);
    344     }
     359
     360    }
     361
     362    $sc_debug_logger->log_debug("ScrtOrder->store() finished {$this->id}", 0);
    345363     
    346364    return $this->id;
     
    415433        if($item['item_type'] != 'bundled') {
    416434          $this->order_summary_items[] = array(
    417               'name'          => $item['product_name'],
     435              'name'          => apply_filters('sc_order_summary_item_name', $item['product_name'], $item),
    418436              'total_amount'  => (float) $item['subtotal'],
    419437              'subtotal'      => (float) $item['subtotal'],
  • studiocart/trunk/public/class-ncs-cart-public.php

    r3025400 r3037195  
    18411841        if ( $create_intent ) {
    18421842            $args = [
    1843                 'amount'               => $amount_for_stripe,
    1844                 'currency'             => $sc_currency,
    1845                 'statement_descriptor' => preg_replace( "/[^0-9a-zA-Z ]/", '', substr( $descriptor, 0, 22 ) ),
    1846                 'description'          => sc_get_public_product_name( $sc_product_id ),
    1847                 'customer'             => $customer->id,
    1848                 'confirmation_method'  => 'automatic',
    1849                 'setup_future_usage'   => 'off_session',
    1850                 'metadata'             => [
     1843                'amount'                      => $amount_for_stripe,
     1844                'currency'                    => $sc_currency,
     1845                'statement_descriptor_suffix' => preg_replace( "/[^0-9a-zA-Z ]/", '', substr( $descriptor, 0, 22 ) ),
     1846                'description'                 => sc_get_public_product_name( $sc_product_id ),
     1847                'customer'                    => $customer->id,
     1848                'confirmation_method'         => 'automatic',
     1849                'setup_future_usage'          => 'off_session',
     1850                'metadata'                    => [
    18511851                'sc_product_id' => $sc_product_id,
    18521852                'origin'        => get_site_url(),
     
    29272927            }
    29282928           
    2929             // run integrations
    2930            
    2931             if ( isset( $subscription->status ) && $subscription->status != 'incomplete' ) {
    2932                 $order->status = 'paid';
    2933                 $order->payment_status = 'paid';
    2934             }
    2935            
    2936             $order->store();
    2937            
    2938             if ( $order->id ) {
    2939                 $sc_debug_logger->log_debug( "Updated order status to {$order->status}", 0 );
    2940             } else {
    2941                 $sc_debug_logger->log_debug( "Failed to update order status", 4 );
     2929            // if setting for webhook updates only, then evaluate to false
     2930            $update_invoice = !get_option( '_sc_stripe_invoice_webhook_updates_only', false );
     2931           
     2932            if ( apply_filters(
     2933                'sc_update_stripe_invoice_during_checkout',
     2934                $update_invoice,
     2935                $order,
     2936                $sub
     2937            ) ) {
     2938                // run integrations
     2939               
     2940                if ( isset( $subscription->status ) && $subscription->status != 'incomplete' ) {
     2941                    $order->status = 'paid';
     2942                    $order->payment_status = 'paid';
     2943                }
     2944               
     2945                $order->store();
     2946               
     2947                if ( $order->id ) {
     2948                    $sc_debug_logger->log_debug( "Updated order status to {$order->status}", 0 );
     2949                } else {
     2950                    $sc_debug_logger->log_debug( "Failed to update order status", 4 );
     2951                }
     2952           
    29422953            }
    29432954           
     
    37163727    {
    37173728        $response = array();
    3718         $stripe = NCS_Stripe::instance();
     3729        $ncs_stripe = NCS_Stripe::instance();
    37193730        $_POST['post_id'] = intval( $_POST['post_id'] );
    37203731        $sub = new ScrtSubscription( $_POST['post_id'] );
     
    37243735           
    37253736            if ( !empty($_POST['payment_method']) ) {
    3726                 $stripe = $stripe->stripe();
     3737                $stripe = $ncs_stripe->stripe();
    37273738               
    37283739                if ( $sub->status == 'incomplete' || $sub->status == 'past_due' || $sub->status == 'pending-payment' ) {
     
    37363747                }
    37373748               
    3738                 $response = $stripe->updatePaymentMethod( $sc_subscription_id, $_POST['payment_method'], $sc_customer_id );
     3749                $response = $ncs_stripe->updatePaymentMethod( $sc_subscription_id, $_POST['payment_method'], $sc_customer_id );
    37393750                if ( $response->id || empty($response) ) {
    37403751                    $response = array(
  • studiocart/trunk/studiocart.php

    r3025400 r3037195  
    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.6.3
     19 * Version:           2.6.4
    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.6.3' );
     89    define( 'NCS_CART_VERSION', '2.6.4' );
    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.