Plugin Directory

Changeset 3354189


Ignore:
Timestamp:
09/01/2025 06:10:08 PM (4 months ago)
Author:
optimocha
Message:

v2.4

Location:
disable-cart-fragments/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • disable-cart-fragments/trunk/disable-cart-fragments.php

    r2931115 r3354189  
    55 * Plugin URI: https://wordpress.org/plugins/disable-cart-fragments/
    66 * Description: A better way to disable WooCommerce's cart fragments script, and re-enqueue it when the cart is updated. Works with all caching plugins.
    7  * Version: 2.3
     7 * Version: 2.4
    88 * Author: Optimocha
    99 * Author URI: https://optimocha.com/
     
    1111 * Requires PHP: 5.6 or later
    1212 * WC requires at least: 2.0
    13  * WC tested up to: 7.8.0
     13 * WC tested up to: 10.1.2
    1414 * Text Domain: disable-cart-fragments
    1515 *
     
    3030defined( 'ABSPATH' ) or die();
    3131
    32 if( !defined( 'OPTIMOCHA_DCF_PATH' ) ) {
    33     define( 'OPTIMOCHA_DCF_PATH', plugin_dir_path( __FILE__ ) );
    34 }
    35 
    36 if( !defined( 'OPTIMOCHA_DCF_BASENAME' ) ) {
    37     define( 'OPTIMOCHA_DCF_BASENAME', plugin_basename( __FILE__ ) );
    38 }
    39 
    40 if( !defined( 'OPTIMOCHA_DCF_DOMAIN' ) ) {
    41     define( 'OPTIMOCHA_DCF_DOMAIN', 'disable-cart-fragments' );
    42 }
    43 
    44 require OPTIMOCHA_DCF_PATH . "/DCF_Notice_Manager.php";
     32require plugin_dir_path( __FILE__ ) . "/DCF_Notice_Manager.php";
    4533
    4634add_action( 'before_woocommerce_init', function() {
     
    5644        function __construct(){
    5745
    58             add_filter( "plugin_action_links_" . OPTIMOCHA_DCF_BASENAME, array( $this, 'settings_links' ) );
     46            add_filter( "plugin_action_links_" . plugin_basename( __FILE__ ), array( $this, 'settings_links' ) );
    5947
    60             add_action('admin_init', [ $this, 'set_pro_service_notice' ]);
     48            add_action( 'admin_init', [ $this, 'set_pro_service_notice' ] );
    6149
    6250            if( $this->dcf_is_plugin_active( 'speed-booster-pack/speed-booster-pack.php' ) ) {
     
    8977            ?>
    9078            <div class="notice notice-error">
    91                 <p><?php _e( "We detected that you're already using another plugin of ours: Speed Booster Pack. Since SBP already has the same \"Disable cart fragments\" feature, you can safely deactivate the Disable Cart Fragments plugin and keep using Speed Booster Pack! :)", OPTIMOCHA_DCF_DOMAIN ); ?>
     79                <p><?php _e( "We detected that you're already using another plugin of ours: Speed Booster Pack. Since SBP already has the same \"Disable cart fragments\" feature, you can safely deactivate the Disable Cart Fragments plugin and keep using Speed Booster Pack! :)", disable-cart-fragments ); ?>
    9280                </p>
    9381            </div>
     
    141129
    142130        function settings_links( $links ) {
    143             $pro_link = ' <a href="https://optimocha.com/?ref=disable-cart-fragments" target="_blank">Pro Help</a > ';
     131            $pro_link = ' <a href="https://optimocha.com/?ref=disable-cart-fragments" target="_blank">Pro Help</a> ';
    144132            array_unshift( $links, $pro_link );
    145133
     
    152140
    153141            new \DCF\DCF_Notice_Manager();
    154             \DCF\DCF_Notice_Manager::display_notice('dcf_pro_service', '<p><a href="https://optimocha.com/?ref=disable-cart-fragments" target="_blank">' . __( "If you need any help optimizing your website speed, if you're ready to <em>invest in</em> speed optimization, you can visit Optimocha.com by clicking here, and have us speed up your site!", OPTIMOCHA_DCF_DOMAIN ) . '</a></p>', 'info');
     142            \DCF\DCF_Notice_Manager::display_notice( 'dcf_pro_service', '<p><a href="https://optimocha.com/?ref=disable-cart-fragments" target="_blank">' . __( "If you need any help optimizing your website speed, if you're ready to <em>invest in</em> speed optimization, you can visit Optimocha.com by clicking here, and have us speed up your site!", disable-cart-fragments ) . '</a></p>', 'info' );
    155143        }
    156144    }
  • disable-cart-fragments/trunk/readme.txt

    r2931115 r3354189  
    33Tags: disable cart fragments, woocommerce, cart fragments, woocommerce cart fragments
    44Requires at least: 4.6
    5 Tested up to: 6.2
     5Tested up to: 6.8.2
    66Requires PHP: 5.6
    77WC requires at least: 2.0
    8 WC tested up to: 7.8.0
    9 Stable tag: 2.3
     8WC tested up to: 10.1.2
     9Stable tag: 2.4
    1010License: GPLv3 or later
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    4444
    4545== Changelog ==
     46
     47= 2.4 =
     48* Tested and ensured compatibility with the latest versions of WordPress, WooCommerce and PHP.
     49* Cleaned up the code a bit.
    4650
    4751= 2.3 =
Note: See TracChangeset for help on using the changeset viewer.