Plugin Directory

Changeset 3451273


Ignore:
Timestamp:
02/01/2026 08:17:21 AM (8 weeks ago)
Author:
phppoet
Message:

Update codebase of 3.7.4

Location:
customize-my-account-for-woocommerce
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • customize-my-account-for-woocommerce/tags/3.7.4/customize-my-account-for-woocommerce.php

    r3451267 r3451273  
    44    Plugin URI: https://sysbasics.com
    55    Description: Customize My account page. Add/Edit/Remove Endpoints.
    6     Version: 3.7.3
     6    Version: 3.7.4
    77    Author: SysBasics
    88    Author URI: https://sysbasics.com
     
    164164        // Don't forget to exit() because wp_redirect doesn't exit automatically
    165165        add_option('wcmamtx_do_activation_redirect', true);
    166 
    167 
     166       
     167       
    168168
    169169
  • customize-my-account-for-woocommerce/tags/3.7.4/include/admin/admin_settings.php

    r3450246 r3451273  
    470470            update_option($this->wcmamtx_notices_settings_page,$new_row_values);
    471471            update_option('wcmamtx_flush_rewrite_cache_required',"yes");
     472
     473            if ($row_type == 'endpoint') {
     474                $allowed_endpoints = get_option("wcmamtx_allowed_endpoint_trial");
     475
     476                if (isset($allowed_endpoints) && ($allowed_endpoints > 0))  {
     477                    $allowed_endpoints = $allowed_endpoints - 1;
     478                    update_option('wcmamtx_allowed_endpoint_trial',$allowed_endpoints);
     479                }
     480            }
    472481        }
    473482
     
    10311040                <?php wp_nonce_field( 'update-options' ); ?>
    10321041                <?php settings_fields( $tab ); ?>
    1033                 <?php do_settings_sections( $tab ); ?>
     1042                <?php
     1043                do_settings_sections( $tab );
     1044
     1045                $allowed_endpoints = get_option("wcmamtx_allowed_endpoint_trial");
     1046               
     1047
     1048                if (isset($allowed_endpoints) && ($allowed_endpoints > 0))  {
     1049                    $endpoint_button_id = "#wcmamtx_example_modal";
     1050                    $endpoint_button_class = "";
     1051                } else {
     1052                    $endpoint_button_id = "#wcmamtx_example_modal2";
     1053                    $endpoint_button_class = "wcmamtx_disabled2";
     1054                }
     1055               
     1056                ?>
    10341057
    10351058                <div class="wcmamtx_buttons_section">
     
    10371060                    <?php if (isset($current_tab) && ($current_tab == "wcmamtx_advanced_settings") && ($current_tab != "wcmamtx_wizard_settings") ) { ?>
    10381061                        <div class="wcmamtx_add_section_div">
    1039                             <button type="button" href="#" data-toggle="modal" data-target="#wcmamtx_example_modal" data-etype="endpoint" id="wcmamtx_add_endpoint" class="btn btn-sm btn-primary wcmamtx_add_group ">
     1062                            <button type="button" href="#" data-toggle="modal" data-target="<?php echo $endpoint_button_id; ?>" data-etype="endpoint" id="wcmamtx_add_endpoint" class="btn btn-sm btn-primary wcmamtx_add_group <?php echo $endpoint_button_class; ?>">
    10401063                                <span class="dashicons dashicons-insert"></span>
    10411064                                <?php echo esc_html__( 'Add Endpoint' ,'customize-my-account-for-woocommerce'); ?>
  • customize-my-account-for-woocommerce/tags/3.7.4/include/frontend/frontend_functions.php

    r3451230 r3451273  
    892892    public function wcmamtx_add_custom_endpoint_page() {
    893893        $wcmamtx_tabs = get_option('wcmamtx_advanced_settings');
     894        add_option('wcmamtx_allowed_endpoint_trial', 02);
    894895
    895896        $core_fields       = 'dashboard,orders,downloads,edit-address,edit-account,customer-logout';
  • customize-my-account-for-woocommerce/tags/3.7.4/readme.txt

    r3451267 r3451273  
    77WC Requires at least: 4.0
    88Requires PHP: 5.2
    9 Stable tag: 3.7.3
     9Stable tag: 3.7.4
    1010Requires Plugins: woocommerce
    1111License: GPLv2 or later
  • customize-my-account-for-woocommerce/trunk/customize-my-account-for-woocommerce.php

    r3451267 r3451273  
    44    Plugin URI: https://sysbasics.com
    55    Description: Customize My account page. Add/Edit/Remove Endpoints.
    6     Version: 3.7.3
     6    Version: 3.7.4
    77    Author: SysBasics
    88    Author URI: https://sysbasics.com
     
    164164        // Don't forget to exit() because wp_redirect doesn't exit automatically
    165165        add_option('wcmamtx_do_activation_redirect', true);
    166 
    167 
     166       
     167       
    168168
    169169
  • customize-my-account-for-woocommerce/trunk/include/admin/admin_settings.php

    r3450246 r3451273  
    470470            update_option($this->wcmamtx_notices_settings_page,$new_row_values);
    471471            update_option('wcmamtx_flush_rewrite_cache_required',"yes");
     472
     473            if ($row_type == 'endpoint') {
     474                $allowed_endpoints = get_option("wcmamtx_allowed_endpoint_trial");
     475
     476                if (isset($allowed_endpoints) && ($allowed_endpoints > 0))  {
     477                    $allowed_endpoints = $allowed_endpoints - 1;
     478                    update_option('wcmamtx_allowed_endpoint_trial',$allowed_endpoints);
     479                }
     480            }
    472481        }
    473482
     
    10311040                <?php wp_nonce_field( 'update-options' ); ?>
    10321041                <?php settings_fields( $tab ); ?>
    1033                 <?php do_settings_sections( $tab ); ?>
     1042                <?php
     1043                do_settings_sections( $tab );
     1044
     1045                $allowed_endpoints = get_option("wcmamtx_allowed_endpoint_trial");
     1046               
     1047
     1048                if (isset($allowed_endpoints) && ($allowed_endpoints > 0))  {
     1049                    $endpoint_button_id = "#wcmamtx_example_modal";
     1050                    $endpoint_button_class = "";
     1051                } else {
     1052                    $endpoint_button_id = "#wcmamtx_example_modal2";
     1053                    $endpoint_button_class = "wcmamtx_disabled2";
     1054                }
     1055               
     1056                ?>
    10341057
    10351058                <div class="wcmamtx_buttons_section">
     
    10371060                    <?php if (isset($current_tab) && ($current_tab == "wcmamtx_advanced_settings") && ($current_tab != "wcmamtx_wizard_settings") ) { ?>
    10381061                        <div class="wcmamtx_add_section_div">
    1039                             <button type="button" href="#" data-toggle="modal" data-target="#wcmamtx_example_modal" data-etype="endpoint" id="wcmamtx_add_endpoint" class="btn btn-sm btn-primary wcmamtx_add_group ">
     1062                            <button type="button" href="#" data-toggle="modal" data-target="<?php echo $endpoint_button_id; ?>" data-etype="endpoint" id="wcmamtx_add_endpoint" class="btn btn-sm btn-primary wcmamtx_add_group <?php echo $endpoint_button_class; ?>">
    10401063                                <span class="dashicons dashicons-insert"></span>
    10411064                                <?php echo esc_html__( 'Add Endpoint' ,'customize-my-account-for-woocommerce'); ?>
  • customize-my-account-for-woocommerce/trunk/include/frontend/frontend_functions.php

    r3451230 r3451273  
    892892    public function wcmamtx_add_custom_endpoint_page() {
    893893        $wcmamtx_tabs = get_option('wcmamtx_advanced_settings');
     894        add_option('wcmamtx_allowed_endpoint_trial', 02);
    894895
    895896        $core_fields       = 'dashboard,orders,downloads,edit-address,edit-account,customer-logout';
  • customize-my-account-for-woocommerce/trunk/readme.txt

    r3451267 r3451273  
    77WC Requires at least: 4.0
    88Requires PHP: 5.2
    9 Stable tag: 3.7.3
     9Stable tag: 3.7.4
    1010Requires Plugins: woocommerce
    1111License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.