Skip to content

Instantly share code, notes, and snippets.

Avatar

Sandeep Kumar wpflippercode

View GitHub Profile
@wpflippercode
wpflippercode / gist:1de1dbaeabea56c68740ea8ce1bf40a1
Created Nov 15, 2017
Display / Hide Age Verification Popup For Particular Post / Page
View gist:1de1dbaeabea56c68740ea8ce1bf40a1
add_filter('agp_verify_age','agp_show_modal');
function agp_show_modal($show_popup,$post_id) {
//check condition according to post id & then return boolean value
return $show_popup;
}
@wpflippercode
wpflippercode / gist:5bf02524caee3d369a2d0c8921d9911c
Created Nov 15, 2017
Customize Plugin Settings In JS File
View gist:5bf02524caee3d369a2d0c8921d9911c
add_filter('agp_current_settings','agp_changed_plugin_settings');
function agp_changed_plugin_settings($settings) {
//Modify Settings According To Custom Conditions.
return $settings;
}
@wpflippercode
wpflippercode / gist:9a33446e4b4963634e3bafab8b240f39
Last active Nov 13, 2017
Fix marker display issue in conflicting countries having same zipcodes
View gist:9a33446e4b4963634e3bafab8b240f39
add_filter('wdap_exclude_countries','excluding_countries');
function excluding_countries($countries) {
/*Return array of country codes which you want to exclude to display marker. Some countries have same zipcodes due to which markers are displayed on both countries and this represent product delivery area, however you need to display it in only one country as your deliver in one country only */
return $countries;
}
@wpflippercode
wpflippercode / gist:18ab5dd27156ece70a5f00b537cfb398
Created Nov 13, 2017
Update default placeholder text of search input textbox inside product availability google map
View gist:18ab5dd27156ece70a5f00b537cfb398
add_filter('wdap_placeholder_search','wdap_placeholder_search');
function wdap_placeholder_search($placeholder) {
//Modify search textbox's default placeholder value.
return $placeholder;
}
@wpflippercode
wpflippercode / gist:3f2212eb97c09bde1012547ffe5b35f4
Last active Nov 13, 2017
Update zipcode listing heading text inside product availability tab on product page
View gist:3f2212eb97c09bde1012547ffe5b35f4
add_filter('wdap_zipcode_listing_heading','wdap_zipcpde_listing_heading');
function wdap_zipcpde_listing_heading($text) {
//Modify Zipcode Listing Heading.
return $text;
}
@wpflippercode
wpflippercode / gist:39311393f30db99f010bbdba2b8444dd
Created Nov 13, 2017
Update Default Heading Of Product Availability Tab
View gist:39311393f30db99f010bbdba2b8444dd
add_filter('wdap_pa_tab_heading','wdap_tab_heading');
function wdap_tab_heading($text) {
//Modify Product Availability Tab Label On Product Page.
return $text;
}
@wpflippercode
wpflippercode / gist:43739a6261d8d5da26f6b42f6eac1834
Last active Nov 13, 2017
Update Marker's Icon Image In Google Maps Representing Product Availability Areas
View gist:43739a6261d8d5da26f6b42f6eac1834
add_filter('wdap_map_icon','wdap_map_icon_update');
function wdap_map_icon_update($icon) {
// update google map icon.
return $icon;
}
@wpflippercode
wpflippercode / gist:b71df14a8e6c0c89b693c8444bd1bb4a
Created Nov 8, 2017
Change loader image in delivery area form
View gist:b71df14a8e6c0c89b693c8444bd1bb4a
add_filter('wdap_loader_img_url','wdap_loader_image');
function wdap_loader_image($icon_url) {
//replace icon url.
return $icon_url;
}
@wpflippercode
wpflippercode / gist:aa861eec6865d3941fd4c535c9878f08
Created Oct 11, 2017
Change Map Language According to Site Language
View gist:aa861eec6865d3941fd4c535c9878f08
add_filter('wpgmp_map_lang','wpgmp_map_lang' );
function wpgmp_map_lang($lang) {
global $post;
if( $post->ID == 96 )
{
$lang = 'hi';
}
return $lang;
}
@wpflippercode
wpflippercode / gist:a5c92df20c86fbc722c0b39c62aa3ac2
Created Sep 28, 2017
Modify Strings Used on Frontend in Google Maps Plugin
View gist:a5c92df20c86fbc722c0b39c62aa3ac2
add_filter('wpgmp_text_settings','wpgmp_text_settings',1,2);
function wpgmp_text_settings($strings,$map_id) {
$strings['search_placeholder'] = "";
return $strings;
}