inder42218
Forum Replies Created
-
Forum: Plugins
In reply to: [WC - APG SMS Notifications] Checkbox to subscribe to text alertsProbably, I am asking too much.. Do you have a sample code ? What parameters need to be passed to Filters & also how to get value of billing fields in filter for check .. Thank You….
Forum: Plugins
In reply to: [WC - APG SMS Notifications] duplicate message sending on SMS CountryI also have same issue. I am using twilio. Customer is receiving text twice for order processing. THanks
Forum: Plugins
In reply to: [WooCommerce] Change order of billing fields on checkout pageI used this one & it worked. it son latest woocommerce.
// Reorder Checkout Fields
add_filter(‘woocommerce_checkout_fields’,’reorder_woo_fields’);function reorder_woo_fields($fields) {
$fields2[‘billing’][‘billing_email’] = $fields[‘billing’][‘billing_email’];
$fields2[‘billing’][‘billing_phone’] = $fields[‘billing’][‘billing_phone’];
$fields2[‘billing’][‘billing_first_name’] = $fields[‘billing’][‘billing_first_name’];
$fields2[‘billing’][‘billing_last_name’] = $fields[‘billing’][‘billing_last_name’];
$fields2[‘billing’][‘billing_country’] = $fields[‘billing’][‘billing_country’];
$fields2[‘billing’][‘billing_address_1’] = $fields[‘billing’][‘billing_address_1’];
$fields2[‘billing’][‘billing_address_2’] = $fields[‘billing’][‘billing_address_2’];
$fields2[‘billing’][‘billing_city’] = $fields[‘billing’][‘billing_city’];
$fields2[‘billing’][‘billing_postcode’] = $fields[‘billing’][‘billing_postcode’];
$fields2[‘billing’][‘billing_state’] = $fields[‘billing’][‘billing_state’];// Add full width Classes and Clears to Adjustments
$fields2[‘billing’][‘billing_email’] = array(
‘label’ => __(‘Email’, ‘woocommerce’),
‘required’ => true,
‘class’ => array(‘form-row-wide’),
‘clear’ => true
);
$fields2[‘billing’][‘billing_phone’] = array(
‘label’ => __(‘Phone’, ‘woocommerce’),
‘required’ => false,
‘class’ => array(‘form-row-wide’),
‘clear’ => true
);return $fields2;
}Forum: Plugins
In reply to: [WooCommerce] Change order of billing fields on checkout pageCan you please paste the full code ? I am a rookie & my code is not working to sequence the fields…
add_filter( ‘woocommerce_default_address_fields’, ‘yourplugin_move_checkout_fields’ );
function yourplugin_move_checkout_fields( $fields ) {
// Author: apppresser.com// Move these around as necessary. You’ll see we added email first.
$billing_order = array(
“billing_email”,
“billing_first_name”,
“billing_last_name”,
“billing_company”,
“billing_address_1”,
“billing_address_2”,
“billing_postcode”,
“billing_country”,
“billing_state”,
“billing_phone”
);// This sets the billing fields in the order above
foreach($billing_order as $billing_field) {
$billing_fields[$billing_field] = $fields[“billing”][$billing_field];}
$fields[“billing”] = $billing_fields;
$fields[‘billing’][‘billing_first_name’][‘priority’] = 10;
$fields[‘billing’][‘billing_last_name’][‘priority’] = 20;
$fields[‘billing’][‘billing_email’][‘priority’] = 30;
$fields[‘billing’][‘billing_phone’][‘priority’] = 40;
$fields[‘billing’][‘billing_country’][‘priority’] = 50;
$fields[‘billing’][‘billing_company’][‘priority’] = 60;
$fields[‘billing’][‘billing_address_1’][‘priority’] = 70;
$fields[‘billing’][‘billing_address_2’][‘priority’] = 80;
$fields[‘billing’][‘billing_city’][‘priority’] = 90;
$fields[‘billing’][‘billing_postcode’][‘priority’] = 100;return $fields;
}