import wixUsers from 'wix-users';
import wixLocation from 'wix-location';
import { session } from 'wix-storage-frontend';
import wixData from 'wix-data';
import { getMemberCheckoutProfile, createOrderFromProfile } from 'backend/b2bCheckout.jsw';
import { calculateShipping } from 'backend/shipping.web.js'; // oder ggf. 'backend/shipping.web.jsw'
import { computeDiscount } from 'public/discount.js';
function formatAddressBlock(company, firstName, lastName, addr) {
const countryNameimport wixStores from 'wix-stores-backend';
import wixData from 'wix-data';
import { currentMember } from 'wix-members-backend';
import { contacts } from 'wix-crm-backend';
import { members } from 'wix-members-backend';
import { computeDiscount } from 'public/discount.js'; // ✅ Rabatt‑Logik importieren
/* ───────────── Helpers ───────────── */
const GUID_RX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
const TAX_RATE = 0.10;
function pseudoUuimport {
Stack,
Typography,
LinearProgress,
Alert,
TextField,
Box,
FormGroup,
Button,
} from '@mui/material';
import { DefaultLayout } from '../../layouts';
import { PageTmpl } from '../../templates';
import { useGetHelloMutation } from '../../store/apis';
import { useBase } from '../../store/slices';
import { SerializedError } from '@reduxjs/toolkit';
import { FetchBaseQueryError } from '@reduxjs/toolkit/query';
import { useEffect, useState } from 'react';
exp---
description: Rewrite a PROMPT with PROBLEMS.
---
You are a world-class prompt engineering expert. Your task is to analyze and rewrite the following non-functioning or ineffective prompt (PROMPT) so that it becomes precise, rich in context, and fully comprehensible to a language model.
Additionally, we need to address problems (PROBLEMS) exhibited by the prompt - if they are defined.
When improving the prompt, focus on the following elements:
1. **Role Assignment:** Propose a spe```sh
sudo pip install pipx
echo 'export PATH="$HOME/.local/.bin:$PATH"' >> ~/.bashrc
```add_action( 'save_post', 'create_child_pages__foundation', 10, 3);
function create_child_pages__foundation( $post_id, $post, $update ) {
// SET vars
$__board_portal_page_password = 'XXXXXXXX';
// bail out if this is an autosave
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
// Perform permission checks! For example:
if ( !current_user_can('edit_post', $post_id) ) {
return;
}
// Only set for post_type = foundation!
if ( $post->post_type !== 'fou# Claude Code Architecture Framework
## Système de documentation et sub-agents pour projets complexes
**Version:** 1.0
**Date:** 31 Octobre 2024
**Auteur:** Greg (avec Claude)
---
## Table des Matières
1. [Vision & Principes](#vision--principes)
2. [Architecture Documentaire](#architecture-documentaire)
3. [Sub-agents Spécialisés](#sub-agents-spécialisés)
4. [Flux de Travail Complet](#flux-de-travail-complet)
5. [Templates](#templates)
6. [Exemples Concrets](#exemples-con// Add the custom field "extra_company"
add_action( 'woocommerce_edit_account_form', 'add_extra_company_to_edit_account_form' );
function add_extra_company_to_edit_account_form() {
$user = wp_get_current_user();
?>
<fieldset>
<legend>Additional Information</legend>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="extra_company"><?php _e( 'Company Name', 'woocommerce' ); ?></label>
<input type="text" class="woocommerce-Input w/* USAGE: [display-all-wooc-product-attributes]
*/
function shortcode__display_all_wooc_product_attributes($atts) {
global $product;
$attributes = $product->get_attributes();
if ( ! $attributes ) {
return;
}
$display_result = '';
#<p><strong style="text-transform: uppercase;">Voltage</strong>: 115</p>
#@wp_mail('nate@cybersprout.net','test Tanis PA',var_export($attributes,1));
foreach ( $attributes as $attribute ) {
if ( $attribute->get_variation() ) {
continue/**
* @snippet Change No. of Thumbnails per Row @ Product Gallery | WooCommerce
* @how-to Get CustomizeWoo.com FREE
* @sourcecode https://businessbloomer.com/?p=67117
* @author Rodolfo Melogli
* @testedwith WooCommerce 3.0.5
*/
add_filter( 'woocommerce_single_product_image_gallery_classes', 'bbloomer_5_columns_product_gallery' );
function bbloomer_5_columns_product_gallery( $wrapper_classes ) {
$columns = 5; // change this to 2, 3, 5, 6 etc. Default/* TEMPLATE for creating a shortcode to query related data as a view
* rename these 2 instances below: shortcode__display_wooc_product_attribute
* renamed this below: display-wooc-product-attribute
* USAGE: [display-wooc-product-attribute attribute="" postid=""]
*/
function shortcode__display_wooc_product_attribute($atts) {
extract( shortcode_atts( array(
'attribute' => '',
'postid' => ''
), $atts ) );
$html = '';
if($postid != '' and $attribute != '')
{
$taxono// 18-07-2018
// Redirect user to last viewed page before logging in
function raj_login_redirect( $redirect_to, $request=false, $user=false )
{
if (isset($_COOKIE['current_page'])) { $current_page = $_COOKIE['current_page']; }
if (isset($_COOKIE['last_viewed_page'])) { $last_viewed_page = $_COOKIE['last_viewed_page']; }
if (isset($_COOKIE['last_referring_page'])) { $last_referring_page = $_COOKIE['last_referring_page']; }
if (!empty($current_page)) {
$downloadable = strpos($curreadd_filter( 'woocommerce_email_subject_new_order', 'custom_new_order_email_subject', 100, 2 );
function custom_new_order_email_subject( $subject, $order ) {
if ( $order->has_status( 'on-hold' ) ) {
// Change the subject for 'on-hold' orders
$subject = 'New Purchase Request: #' . $order->get_id();
} else {
// Change the subject for all other orders
$subject = 'New Order: #' . $order->get_id();
}
return $subject;
}
add_filter( 'woocommerce_email_heading_new_order', 'custadd_filter('woocommerce_currency_symbol', 'add_usd_to_price', 10, 2);
function add_usd_to_price($currency_symbol, $currency) {
if ('USD' === $currency) {
$currency_symbol = 'USD $ ';
}
return $currency_symbol;
}/**
* @snippet Change default message for no payment gateways
* @reference https://wordpress.org/support/topic/edit-text-sorry-it-seems-that-there-are-no-available-payment-methods/
*/
add_filter ( 'woocommerce_no_available_payment_methods_message', 'custom_no_available_payment_methods_message' );
function custom_no_available_payment_methods_message( $message ) {
return 'Payment methods will display once you have entered your shipping information.';
}
/**
* @snippet HIDE the Padd_action( 'woocommerce_review_order_after_shipping' , 'shipping_zone__custom_notice' );
function shipping_zone__custom_notice() {
// HERE DEFINE YOUR SHIPPING ZONE NAME(S)
$targeted_zones_names = array('International Shipping'); // <====== <====== <====== <====== <======
// Get the customer shipping zone name
$chosen_methods = WC()->session->get( 'chosen_shipping_methods' ); // The chosen shipping method
$chosen_method = explode(':', reset($chosen_metho