

Métodos del objeto $orden
Array ( [0]
get_data_without_line_items [1]
get_line_item_data [2]
add_filters [3]
order_class_name [4]
get_report_customer_id [5]
is_returning_customer [6]
get_customer_first_name [7]
get_customer_last_name [8]
payment_complete [9]
get_formatted_order_total [10]
save [11]
set_status [12]
maybe_set_date_paid [13]
update_status [14]
get_base_data [15]
get_data [16]
get_changes [17]
get_order_number [18]
get_order_key [19]
get_customer_id [20]
get_user_id [21]
get_user [22]
get_billing_first_name [23]
get_billing_last_name [24]
get_billing_company [25]
get_billing_address_1 [26]
get_billing_address_2 [27]
get_billing_city [28]
get_billing_state [29]
get_billing_postcode [30]
get_billing_country [31]
get_billing_email [32]
get_billing_phone [33]
get_shipping_first_name [34]
get_shipping_last_name [35]
get_shipping_company [36]
get_shipping_address_1 [37]
get_shipping_address_2 [38]
get_shipping_city [39]
get_shipping_state [40]
get_shipping_postcode [41]
get_shipping_country [42]
get_shipping_phone [43]
get_payment_method [44]
get_payment_method_title [45]
get_transaction_id [46]
get_customer_ip_address [47]
get_customer_user_agent [48]
get_created_via [49]
get_customer_note [50]
get_date_completed [51]
get_date_paid [52]
get_cart_hash [53]
get_address [54]
get_shipping_address_map_url [55]
get_formatted_billing_full_name [56]
get_formatted_shipping_full_name [57]
get_formatted_billing_address [58]
get_formatted_shipping_address [59]
has_billing_address [60]
has_shipping_address [61]
set_order_key [62]
set_customer_id [63]
set_billing_first_name [64]
set_billing_last_name [65]
set_billing_company [66]
set_billing_address_1 [67]
set_billing_address_2 [68]
set_billing_city [69]
set_billing_state [70]
set_billing_postcode [71]
set_billing_country [72]
set_billing_email [73]
set_billing_phone [74]
set_shipping_first_name [75]
set_shipping_last_name [76]
set_shipping_company [77]
set_shipping_address_1 [78]
set_shipping_address_2 [79]
set_shipping_city [80]
set_shipping_state [81]
set_shipping_postcode [82]
set_shipping_country [83]
set_shipping_phone [84]
set_payment_method [85]
set_payment_method_title [86]
set_transaction_id [87]
set_customer_ip_address [88]
set_customer_user_agent [89]
set_created_via [90]
set_customer_note [91]
set_date_completed [92]
set_date_paid [93]
set_cart_hash [94]
key_is_valid [95]
has_cart_hash [96]
is_editable [97]
is_paid [98]
is_download_permitted [99]
needs_shipping_address [100]
has_downloadable_item [101]
get_downloadable_items [102]
needs_payment [103]
needs_processing [104]
get_checkout_payment_url [105]
get_checkout_order_received_url [106]
get_cancel_order_url [107]
get_cancel_order_url_raw [108]
get_cancel_endpoint [109]
get_view_order_url [110]
get_edit_order_url [111]
add_order_note [112]
get_customer_order_notes [113]
get_refunds [114]
get_total_refunded [115]
get_total_tax_refunded [116]
get_total_shipping_refunded [117]
get_item_count_refunded [118]
get_total_qty_refunded [119]
get_qty_refunded_for_item [120]
get_total_refunded_for_item [121]
get_tax_refunded_for_item [122]
get_total_tax_refunded_by_rate_id [123]
get_remaining_refund_amount [124]
get_remaining_refund_items [125]
get_order_item_totals [126]
is_created_via [127]
__construct [128]
get_type [129]
get_parent_id [130]
get_currency [131]
get_version [132]
get_prices_include_tax [133]
get_date_created [134]
get_date_modified [135]
get_status [136]
get_discount_total [137]
get_discount_tax [138]
get_shipping_total [139]
get_shipping_tax [140]
get_cart_tax [141]
get_total [142]
get_total_tax [143]
get_total_discount [144]
get_subtotal [145]
get_tax_totals [146]
set_parent_id [147]
set_version [148]
set_currency [149]
set_prices_include_tax [150]
set_date_created [151]
set_date_modified [152]
set_discount_total [153]
set_discount_tax [154]
set_shipping_total [155]
set_shipping_tax [156]
set_cart_tax [157]
set_total [158]
remove_order_items [159]
get_items [160]
get_coupons [161]
get_fees [162]
get_taxes [163]
get_shipping_methods [164]
get_shipping_method [165]
get_coupon_codes [166]
get_item_count [167]
get_item [168]
remove_item [169]
add_item [170]
hold_applied_coupons [171]
apply_coupon [172]
remove_coupon [173]
recalculate_coupons [174]
add_product [175]
add_payment_token [176]
get_payment_tokens [177]
calculate_shipping [178]
get_items_tax_classes [179]
calculate_taxes [180]
get_total_fees [181]
update_taxes [182]
calculate_totals [183]
get_item_subtotal [184]
get_line_subtotal [185]
get_item_total [186]
get_line_total [187]
get_item_tax [188]
get_line_tax [189]
get_formatted_line_subtotal [190]
get_subtotal_to_display [191]
get_shipping_to_display [192]
get_discount_to_display [193]
has_status [194]
has_shipping_method [195]
has_free_item [196]
add_coupon [197]
add_tax [198]
add_shipping [199]
add_fee [200]
update_product [201]
update_coupon [202]
update_shipping [203]
update_fee [204]
update_tax [205]
get_product_from_item [206]
set_address [207]
legacy_set_total [208]
__isset [209]
__get [210]
has_meta [211]
display_item_meta [212]
display_item_downloads [213]
get_download_url [214]
get_item_downloads [215]
get_total_shipping [216]
get_item_meta [217]
get_item_meta_array [218]
get_used_coupons [219]
expand_item_meta [220]
get_order [221]
populate [222]
cancel_order [223]
record_product_sales [224]
increase_coupon_usage_counts [225]
decrease_coupon_usage_counts [226]
reduce_order_stock [227]
send_stock_notifications [228]
email_order_items_table [229]
get_order_currency [230]
__sleep [231]
__wakeup [232]
__clone [233]
get_data_store [234]
get_id [235]
delete [236]
__toString [237]
get_data_keys [238]
get_extra_data_keys [239]
get_meta_data [240]
get_meta [241]
meta_exists [242]
set_meta_data [243]
add_meta_data [244]
update_meta_data [245]
delete_meta_data [246]
delete_meta_data_by_mid [247]
get_meta_cache_key [248]
generate_meta_cache_key [249]
prime_raw_meta_data_cache [250]
read_meta_data [251]
save_meta_data [252]
set_id [253]
set_defaults [254]
set_object_read [255]
get_object_read [256]
set_props [257]
apply_changes [258]
get_rounded_items_total [259]
round_item_subtotal [260]
get_item_shipping_amount [261]
get_item_shipping_tax_amount [262]
get_item_coupon_amount )
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;
TRUNCATE TABLE `catalog_category_product_index_tmp`;
TRUNCATE TABLE `catalog_compare_item`;
TRUNCATE TABLE `catalog_product_bundle_option`;
TRUNCATE TABLE `catalog_product_bundle_option_value`;
TRUNCATE TABLE `catalog_product_bundle_price_index`;
TRUNCATE TABLE `catalog_product_bundle_selection`;
TRUNCATE TABLE `catalog_product_bundle_selection_price`;
TRUNCATE TABLE `catalog_product_bundle_stock_index`;
TRUNCATE TABLE `catalog_product_entity`;
TRUNCATE TABLE `catalog_product_entity_datetime`;
TRUNCATE TABLE `catalog_product_entity_decimal`;
TRUNCATE TABLE `catalog_product_entity_gallery`;
TRUNCATE TABLE `catalog_product_entity_int`;
TRUNCATE TABLE `catalog_product_entity_media_gallery`;
TRUNCATE TABLE `catalog_product_entity_media_gallery_value`;
TRUNCATE TABLE `catalog_product_entity_media_gallery_value_to_entity`;
TRUNCATE TABLE `catalog_product_entity_media_gallery_value_video`;
TRUNCATE TABLE `catalog_product_entity_text`;
TRUNCATE TABLE `catalog_product_entity_tier_price`;
TRUNCATE TABLE `catalog_product_entity_varchar`;
TRUNCATE TABLE `catalog_product_index_eav`;
TRUNCATE TABLE `catalog_product_index_eav_decimal`;
TRUNCATE TABLE `catalog_product_index_eav_decimal_idx`;
TRUNCATE TABLE `catalog_product_index_eav_decimal_tmp`;
TRUNCATE TABLE `catalog_product_index_eav_idx`;
TRUNCATE TABLE `catalog_product_index_eav_tmp`;
TRUNCATE TABLE `catalog_product_index_price`;
TRUNCATE TABLE `catalog_product_index_price_bundle_idx`;
TRUNCATE TABLE `catalog_product_index_price_bundle_opt_idx`;
TRUNCATE TABLE `catalog_product_index_price_bundle_opt_tmp`;
TRUNCATE TABLE `catalog_product_index_price_bundle_sel_idx`;
TRUNCATE TABLE `catalog_product_index_price_bundle_sel_tmp`;
TRUNCATE TABLE `catalog_product_index_price_bundle_tmp`;
TRUNCATE TABLE `catalog_product_index_price_cfg_opt_agr_idx`;
TRUNCATE TABLE `catalog_product_index_price_cfg_opt_agr_tmp`;
TRUNCATE TABLE `catalog_product_index_price_cfg_opt_idx`;
TRUNCATE TABLE `catalog_product_index_price_cfg_opt_tmp`;
TRUNCATE TABLE `catalog_product_index_price_downlod_idx`;
TRUNCATE TABLE `catalog_product_index_price_downlod_tmp`;
TRUNCATE TABLE `catalog_product_index_price_final_idx`;
TRUNCATE TABLE `catalog_product_index_price_final_tmp`;
TRUNCATE TABLE `catalog_product_index_price_idx`;
TRUNCATE TABLE `catalog_product_index_price_opt_agr_idx`;
TRUNCATE TABLE `catalog_product_index_price_opt_agr_tmp`;
TRUNCATE TABLE `catalog_product_index_price_opt_idx`;
TRUNCATE TABLE `catalog_product_index_price_opt_tmp`;
TRUNCATE TABLE `catalog_product_index_price_tmp`;
TRUNCATE TABLE `catalog_product_index_tier_price`;
TRUNCATE TABLE `catalog_product_index_website`;
TRUNCATE TABLE `catalog_product_link`;
TRUNCATE TABLE `catalog_product_link_attribute`;
TRUNCATE TABLE `catalog_product_link_attribute_decimal`;
TRUNCATE TABLE `catalog_product_link_attribute_int`;
TRUNCATE TABLE `catalog_product_link_attribute_varchar`;
TRUNCATE TABLE `catalog_product_link_type`;
TRUNCATE TABLE `catalog_product_option`;
TRUNCATE TABLE `catalog_product_option_price`;
TRUNCATE TABLE `catalog_product_option_title`;
TRUNCATE TABLE `catalog_product_option_type_price`;
TRUNCATE TABLE `catalog_product_option_type_title`;
TRUNCATE TABLE `catalog_product_option_type_value`;
TRUNCATE TABLE `catalog_product_relation`;
TRUNCATE TABLE `catalog_product_super_attribute`;
TRUNCATE TABLE `catalog_product_super_attribute_label`;
TRUNCATE TABLE `catalog_product_super_link`;
TRUNCATE TABLE `catalog_product_website`;
TRUNCATE TABLE `catalog_url_rewrite_product_category`;
TRUNCATE TABLE `cataloginventory_stock`;
TRUNCATE TABLE `cataloginventory_stock_item`;
TRUNCATE TABLE `cataloginventory_stock_status`;
TRUNCATE TABLE `cataloginventory_stock_status_idx`;
TRUNCATE TABLE `cataloginventory_stock_status_tmp`;
TRUNCATE TABLE `downloadable_link`;
TRUNCATE TABLE `downloadable_link_price`;
TRUNCATE TABLE `downloadable_link_purchased`;
TRUNCATE TABLE `downloadable_link_purchased_item`;
TRUNCATE TABLE `downloadable_link_title`;
TRUNCATE TABLE `downloadable_sample`;
TRUNCATE TABLE `downloadable_sample_title`;
TRUNCATE TABLE `product_alert_price`;
TRUNCATE TABLE `product_alert_stock`;
TRUNCATE TABLE `report_compared_product_index`;
TRUNCATE TABLE `report_viewed_product_aggregated_daily`;
TRUNCATE TABLE `report_viewed_product_aggregated_monthly`;
TRUNCATE TABLE `report_viewed_product_aggregated_yearly`;
TRUNCATE TABLE `report_viewed_product_index`;
TRUNCATE TABLE `sequence_product`;
INSERT INTO `catalog_product_link_type`(`link_type_id`,`code`) VALUES (1,'relation'),(2,'bundle'),(3,'super'),(4,'up_sell'),(5,'cross_sell');
INSERT INTO `catalog_product_link_attribute`(`product_link_attribute_id`,`link_type_id`,`product_link_attribute_code`,`data_type`) VALUES (1,2,'qty','decimal'),(2,1,'position','int'),(3,4,'position','int'),(4,5,'position','int'),(6,1,'qty','decimal'),(7,3,'position','int'),(8,3,'qty','decimal');
INSERT INTO `cataloginventory_stock`(`stock_id`,`website_id`,`stock_name`) VALUES (1,0,'Default');
SET FOREIGN_KEY_CHECKS = 1;
DELETE FROM url_rewrite where entity_type = 'product';
Para todos los input que se envían por POST o GET usar la función sanitize_text_field(), esta quita los «<«, espacios, limpia en general todos los textos 🙂
Ejemplo de uso:
function setearLocalidad()
{
$_SESSION['localidad'] = sanitize_text_field($_POST['localidad']);
global $woocommerce;
WC()->cart->empty_cart();
return revisarLocalidad();
}
Buscar el archivo view.xml dentro de la carpeta etc ubicada en el tema del sitio y en las líneas 223 aprox agregar al nodo de magnifier el subnodo mode con el valor inside
<var name="magnifier">
<var name="fullscreenzoom">5</var> <!-- Zoom for fullscreen (integer)-->
<var name="top"></var> <!-- Top position of magnifier -->
<var name="left"></var> <!-- Left position of magnifier -->
<var name="width">500</var> <!-- Width of magnifier block -->
<var name="height">500</var> <!-- Height of magnifier block -->
<var name="eventType">hover</var> <!-- Action that atcivates zoom (hover/click) -->
<var name="enabled">true</var> <!-- Turn on/off magnifier (true/false) -->
<var name="mode">inside</var> <!-- Zoom type (outside/inside) -->
</var>
Luego borrar caché y si es necesario recompilar estáticos.
Agregar el sgte código en el archivo htaccess que se encuentre en la raíz de archivos del sitio web.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.dominio.cl/$1 [R,L]