This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cartimize_pro_download_file_name', 'custom_cartimize_pro_download_file_name', 10, 2 ); | |
function custom_cartimize_pro_download_file_name($name, $order) { | |
return 'Order-confirmation-'.$order->get_order_number().'.pdf'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cartimize_get_shipping_details_address', 'custom_cartimize_get_shipping_details_address', 10, 1 ); | |
function custom_cartimize_get_shipping_details_address($args) { | |
unset( $args['state'] ); | |
return $args; | |
} | |
add_filter( 'cartimize_get_billing_details_address', 'custom_cartimize_get_billing_details_address', 10, 1 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add full width header | |
add_action('cartimize_checkout_main_container_before', 'cartimize_custom_short_code_checkout_main_container_start'); | |
function cartimize_custom_short_code_checkout_main_container_start(){ | |
echo do_shortcode('[contact-form-7 id="302" title="Contact form 1"]'); | |
} | |
// Add boxed header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('cartimize_optional_collapse_label_text', 'cartimize_custom_cartimize_optional_collapse_label_text', 10, 2); | |
function cartimize_custom_cartimize_optional_collapse_label_text($optional_label, $args) { | |
$optional_label = esc_html($args['label']); | |
$optional_label .= ' '.esc_html__('Add', 'linear-checkout-for-woo-by-cartimize'); | |
return $optional_label; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('cartimize_billing_phone_custom_attributes', 'cartimize_modify_billing_checkout_fields_new', 100, 1); | |
function cartimize_modify_billing_checkout_fields_new( $checkout_fields ){ | |
// $checkout_fields['data-parsley-pattern'] = '^\(?((?:\+27|27)|0)(-| )?\(?(\d{2})\)?(-| )?(\d{3})(-| )?(\d{4})$'; | |
$checkout_fields['data-parsley-pattern'] = '([0-9]{11})'; | |
return $checkout_fields; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_billing_fields', 'custom_update_billing_email_field', 10, 1 ); | |
function custom_update_billing_email_field( $billing_fields ) { | |
$billing_fields['billing_email']['label'] = 'Email S'; | |
$billing_fields['billing_email']['placeholder'] = 'johndoe@gmail.com'; | |
$billing_fields['billing_email']['required'] = true; | |
return $billing_fields; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cartimize_order_summary_estimated_shipping_text', 'custom_cartimize_order_summary_estimated_shipping_text', 10, 1 ); | |
function custom_cartimize_order_summary_estimated_shipping_text( $text ){ | |
return "Shipping"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'cartimize_inside_account_form', 'cartimize_add_full_name_under_email', 10000000 ); | |
function cartimize_add_full_name_under_email(){ | |
if (! WC()->cart->needs_shipping() && WC()->cart->get_total() <= 0) { | |
$defaultValue = array (); | |
$defaultValue['label'] = apply_filters( 'cartimize_full_name_text_label', esc_html__('Full name', 'linear-checkout-for-woo-by-cartimize') ); | |
$defaultValue['class'] = array ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' ); | |
function custom_remove_woo_checkout_fields( $fields ) { | |
// remove billing fields | |
unset($fields['shipping']['shipping_company']); | |
// remove shipping fields |
NewerOlder