// ————————————————————————————————- // Format player name and division/team // add_action( ‘wpo_wcpdf_after_shipping_address’, ‘add_custom_billing_fields_to_pdf’, 10, 2 ); function add_custom_billing_fields_to_pdf ($document_type, $order) { if ($document_type == ‘packing-slip’) { $billing_playername = ”; $site_title = get_bloginfo(‘name’); if ($site_title == ‘Oakville Raiders’ || $site_title == ‘Seasiders…Continue reading
// Reformat Billing/Shipping Address By Country add_filter( ‘woocommerce_localisation_address_formats’, ‘asa_format_address’ ); function asa_format_address( $address ) { $address[‘default’] = “{company}\n{name}\n{address_1}\n{address_2}\n{city} ” . ” ” . ” {state_code} ” . ” ” . ” {postcode}”; $address[‘AU’] = “{company}\n{name}\n{address_1}\n{address_2}\n{city} ” . ” ” . ” {state_code} ”…Continue reading
add_filter( ‘woocommerce_product_variation_title_include_attributes’, ‘__return_false’ );Continue reading
add_action( ‘wpo_wcpdf_after_customer_notes’, ‘wpo_wcpdf_custom_text’, 10, 2 ); function wpo_wcpdf_custom_text ($document_type, $order) { if ($document_type == ‘packing-slip’) { ?> If you need a return or exchange, or have any concerns about your order, please contact ASA via [email protected]. Please include your…Continue reading
add_action( ‘wpo_wcpdf_after_shipping_address’, ‘add_custom_billing_fields_to_pdf’, 10, 2 ); function add_custom_billing_fields_to_pdf ($document_type, $order) { if ($document_type == ‘packing-slip’) { $billing_playername = ”; $site_title = get_bloginfo(‘name’); if ($site_title == ‘Oakville Raiders’ || $site_title == ‘Seasiders Baseball Club’ || $site_title == ‘Peninsula Softball Club’) {…Continue reading
add_filter( ‘woocommerce_order_shipping_to_display_shipped_via’, ‘__return_empty_string’ );Continue reading
/** * @snippet Move Order Notes @ WooCommerce Checkout * @how-to businessbloomer.com/woocommerce-customization * @author Rodolfo Melogli, Business Bloomer * @compatible WooCommerce 3.9 * @community https://businessbloomer.com/club/ */ // 1. Hide default notes add_filter( ‘woocommerce_enable_order_notes_field’, ‘__return_false’ ); // 2. Create new billing…Continue reading
add_action(‘woocommerce_checkout_create_order’, ‘sync_shipping_with_billing’, 20, 2); function sync_shipping_with_billing($order, $data) { // Check if the order requires shipping if ( $order->needs_shipping_address() ) { // Copy billing details to shipping details $order->set_shipping_first_name( $data[‘billing_first_name’] ); $order->set_shipping_last_name( $data[‘billing_last_name’] ); $order->set_shipping_phone( $data[‘billing_phone’] ); } /* // Retrieve…Continue reading
add_action( ‘template_redirect’, ’empty_cart_redirection’ ); function empty_cart_redirection(){ if( is_checkout() ) : // Here set the Url redirection // $url_redirection = get_permalink( wc_get_page_id( ‘shop’ ) ); $url_redirection = get_home_url(); // When trying to access cart page if cart is already empty if(…Continue reading