Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class BWFAN_WC_Countries {
private static $ins = null;
public static function get_instance() {
if ( null === self::$ins ) {
self::$ins = new self();
}
return self::$ins;
}
public function get_slug() {
return 'wc_countries';
}
public function get_options( $search ) {
$countries = WC()->countries->get_countries();
$country_array = array();
if ( ! empty( $countries ) && is_array( $countries ) ) {
foreach ( $countries as $code => $country ) {
$country_array[ $code ] = $country;
}
}
return BWFAN_PRO_Common::search_srting_from_data( $country_array, $search );
}
}
if ( class_exists( 'BWFAN_Load_Custom_Search' ) ) {
BWFAN_Load_Custom_Search::register( 'BWFAN_WC_Countries' );
}

View File

@@ -0,0 +1,51 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class BWFAN_WC_New_Order_Product {
private static $ins = null;
public static function get_instance() {
if ( null === self::$ins ) {
self::$ins = new self();
}
return self::$ins;
}
public function get_slug() {
return 'wc_new_order_product';
}
public function get_options( $search ) {
$ids = BWFAN_Common::search_products( $search, true );
$product_objects = array_filter( array_map( 'wc_get_product', $ids ), 'wc_products_array_filter_editable' );
$products = array();
foreach ( $product_objects as $product_object ) {
if ( ! $product_object instanceof WC_Product ) {
continue;
}
if ( 'pending' === $product_object->get_status() ) {
continue;
}
$products[ $product_object->get_id() ] = strip_tags( rawurldecode( BWFAN_Common::get_formatted_product_name( $product_object ) ) );
}
return $products;
}
}
if ( class_exists( 'BWFAN_Load_Custom_Search' ) ) {
BWFAN_Load_Custom_Search::register( 'BWFAN_WC_New_Order_Product' );
}

View File

@@ -0,0 +1,65 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class BWFAN_WC_States {
private static $ins = null;
public static function get_instance() {
if ( null === self::$ins ) {
self::$ins = new self();
}
return self::$ins;
}
public function get_slug() {
return 'wc_states';
}
/**
* @param $search
*
* @return array
*/
public function get_options( $search, $extra_data = [] ) {
$country = ! empty( $extra_data['country'] ) ? $extra_data['country'] : '';
$states = WC()->countries->get_states( $country );
if ( empty( $states ) || ! is_array( $states ) ) {
return [];
}
$state_array = [];
if( $country ) {
foreach ( $states as $state_code => $state_name ) {
if ( stripos( $state_name, $search ) !== false || stripos( $country, $search ) !== false ) {
$state_array[ $state_code ] = sprintf( '%s (%s)', $state_name, $country );
}
}
return $state_array;
}
foreach ( $states as $country => $state_list ) {
if ( empty( $state_list ) || ! is_array( $state_list ) ) {
continue;
}
foreach ( $state_list as $state_code => $state_name ) {
if ( stripos( $state_name, $search ) !== false || stripos( $country, $search ) !== false ) {
$state_array[ $state_code ] = sprintf( '%s (%s)', $state_name, $country );
}
}
}
return $state_array;
}
}
if ( class_exists( 'BWFAN_Load_Custom_Search' ) ) {
BWFAN_Load_Custom_Search::register( 'BWFAN_WC_States' );
}

View File

@@ -0,0 +1,2 @@
<?php
//silence is golden