Plugin Directory

Changeset 3312744


Ignore:
Timestamp:
06/16/2025 07:58:03 PM (10 months ago)
Author:
aescobar0
Message:

Recreando tag 1.0.6 con los últimos cambios

Location:
zafepay
Files:
5 edited
5 copied

Legend:

Unmodified
Added
Removed
  • zafepay/tags/1.0.6/build/index.asset.php

    r3055589 r3312744  
    1 <?php return array('dependencies' => array('react'), 'version' => 'ce7fb7b989dcb5b6692f');
     1<?php return array('dependencies' => array('react', 'wc-blocks-registry'), 'version' => 'ce7fb7b989dcb5b6692f');
  • zafepay/tags/1.0.6/includes/class-wc-zafepay-blocks-support.php

    r3046572 r3312744  
    2424  {
    2525    $asset_path = WC_ZAFEPAY_PLUGIN_PATH . '/build/index.asset.php';
    26     $dependencies = [];
    27     if (file_exists($asset_path)) {
     26    $dependencies = [ 'wc-blocks-registry' ];
     27    $version      = null;
     28
     29    if ( file_exists( $asset_path ) ) {
    2830      $asset = require $asset_path;
    29       $dependencies = is_array($asset) && isset($asset['dependencies'])
    30         ? $asset['dependencies']
    31         : $dependencies;
     31
     32      if ( is_array( $asset ) ) {
     33        if ( isset( $asset['dependencies'] ) && is_array( $asset['dependencies'] ) ) {
     34
     35          $dependencies = array_unique( array_merge( $dependencies, $asset['dependencies'] ) );
     36        }
     37
     38        if ( isset( $asset['version'] ) ) {
     39          $version = $asset['version'];
     40        }
     41      }
    3242    }
    33     wp_register_script('wc-zafepay-blocks-integration', WC_ZAFEPAY_PLUGIN_URL . '/build/index.js', ['wc-blocks-registry']);
    3443
    35     return ['wc-zafepay-blocks-integration'];
     44    wp_register_script( 'wc-zafepay-blocks-integration', WC_ZAFEPAY_PLUGIN_URL . '/build/index.js', $dependencies, $version, true );
     45
     46    return [ 'wc-zafepay-blocks-integration' ];
    3647  }
    3748}
  • zafepay/tags/1.0.6/zafepay.php

    r3312737 r3312744  
    88 * Version: 1.0.6
    99 * Requires at least: 5.7
    10  * Tested up to: 6.6
     10 * Tested up to: 6.8
    1111 * Text Domain: zafepay
    1212 * Domain Path: /languages
     
    2121
    2222define('WC_ZAFEPAY_PLUGIN_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
    23 define('WC_ZAFEPAY_PLUGIN_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));
     23define('WC_ZAFEPAY_PLUGIN_URL', untrailingslashit(plugins_url('', __FILE__)));
    2424
    2525function zafepay_add_zafepay_gateway_class($methods)
  • zafepay/trunk/build/index.asset.php

    r3055589 r3312744  
    1 <?php return array('dependencies' => array('react'), 'version' => 'ce7fb7b989dcb5b6692f');
     1<?php return array('dependencies' => array('react', 'wc-blocks-registry'), 'version' => 'ce7fb7b989dcb5b6692f');
  • zafepay/trunk/includes/class-wc-zafepay-blocks-support.php

    r3046572 r3312744  
    2424  {
    2525    $asset_path = WC_ZAFEPAY_PLUGIN_PATH . '/build/index.asset.php';
    26     $dependencies = [];
    27     if (file_exists($asset_path)) {
     26    $dependencies = [ 'wc-blocks-registry' ];
     27    $version      = null;
     28
     29    if ( file_exists( $asset_path ) ) {
    2830      $asset = require $asset_path;
    29       $dependencies = is_array($asset) && isset($asset['dependencies'])
    30         ? $asset['dependencies']
    31         : $dependencies;
     31
     32      if ( is_array( $asset ) ) {
     33        if ( isset( $asset['dependencies'] ) && is_array( $asset['dependencies'] ) ) {
     34
     35          $dependencies = array_unique( array_merge( $dependencies, $asset['dependencies'] ) );
     36        }
     37
     38        if ( isset( $asset['version'] ) ) {
     39          $version = $asset['version'];
     40        }
     41      }
    3242    }
    33     wp_register_script('wc-zafepay-blocks-integration', WC_ZAFEPAY_PLUGIN_URL . '/build/index.js', ['wc-blocks-registry']);
    3443
    35     return ['wc-zafepay-blocks-integration'];
     44    wp_register_script( 'wc-zafepay-blocks-integration', WC_ZAFEPAY_PLUGIN_URL . '/build/index.js', $dependencies, $version, true );
     45
     46    return [ 'wc-zafepay-blocks-integration' ];
    3647  }
    3748}
  • zafepay/trunk/zafepay.php

    r3312737 r3312744  
    88 * Version: 1.0.6
    99 * Requires at least: 5.7
    10  * Tested up to: 6.6
     10 * Tested up to: 6.8
    1111 * Text Domain: zafepay
    1212 * Domain Path: /languages
     
    2121
    2222define('WC_ZAFEPAY_PLUGIN_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
    23 define('WC_ZAFEPAY_PLUGIN_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));
     23define('WC_ZAFEPAY_PLUGIN_URL', untrailingslashit(plugins_url('', __FILE__)));
    2424
    2525function zafepay_add_zafepay_gateway_class($methods)
Note: See TracChangeset for help on using the changeset viewer.