Jagdish Sarma | Reputations

Asked a question
Woocommerce Facebook Pixel track

[apcode language="php"] add_filter('wpm_send_http_api_facebook_capi_requests_blocking', '__return_true'); add_action('wp_footer', function() {     if (is_page('thank-you-order')...

March 19, 2025 2
Asked a question
MC4WP: Mailchimp for WordPress Send data from Contact form 7 with Checkbox, Radio Buton Value

First change name of inputs to like this mc4wp-FIELDNAME and update checkbox names to send data to mailchimp [apcode language="php"] add_filter( 'mc4wp_integration_contact-form-7_data',...

March 12, 2025 2
Asked a question
Woocommerce Hide Free Shipping and Show based on conditions

✅ Hides usps_simple:GROUND_ADVANTAGE when product ID 2133 is in the cart.✅ Shows only free shipping when all products in the cart belong to shipping class 61.✅ Hides free shipping if there are mixed...

March 6, 2025 2
Asked a question
Mac Terminal rename all files inside a folder

Here renaming c2code to c2code_woo_email [apcode language="bash"] find . -type f -name "*c2code*.php" | while read file; do     newname="$(dirname "$file")/$(basename "$file"...

March 5, 2025 2
Asked a question
Woocommerce Single product lightbox disable

[apcode language="php"] add_action( 'after_setup_theme', 'c2_remove_zoom_lightbox_theme_support', 9999 ); function c2_remove_zoom_lightbox_theme_support() {     remove_theme_support(...

March 4, 2025 2
Asked a question
Woocommerce Sale Text Shortcode

[apcode language="php"] function custom_woocommerce_sale_text_shortcode($atts) {     $atts = shortcode_atts(         array('id' => ''),         $atts,         'sale_text'...

March 4, 2025 2
Asked a question
Woocommerce Show Hide Free Shipping based on Shipping Class

[apcode language="php"] add_filter( 'woocommerce_package_rates', 'c2code_hide_free_shipping_for_shipping_class', 9999, 2 ); function c2code_hide_free_shipping_for_shipping_class( $rates,...

March 4, 2025 2
Asked a question
WP Editor Add Body Class

[apcode language="php"] //Editor Add class function cms_custom_editor_body_class($mce_init) {     if (isset($mce_init['body_class'])) {         $mce_init['body_class'] .=...

March 3, 2025 2
Asked a question
Woocommerce Sort product by Price in separate page

[apcode language="php"] //Sort shop page function c2_query_by_post_meta( $query ) {  if (! is_admin() && $query->get( 'post_type' ) == 'product' && is_page('shop-now')...

February 27, 2025 2
Asked a question
WP Call plugin function when creating or editing terms

[apcode language="php"] /** Call function during edit category/taxonomy */ add_action('created_term','wp_custom_edit_taxonomy_update',1010); add_action('edited_term','wp_custom_edit_taxonomy_update',1010);...

February 21, 2025 2
Asked a question
WP Deregister a script and load new script from child theme

[apcode language="php"] function custom_replace_hfe_script() {    // if (!is_user_logged_in()) {         // Deregister the existing script         wp_deregister_script('hfe-frontend-js');...

February 19, 2025 2
Asked a question
WP Fix 404 Js, CSS url with redirection

[apcode language="php"] add_action('template_redirect', function () {     if (is_404()) {         $requested_url = $_SERVER['REQUEST_URI'];          if (strpos($requested_url,...

February 19, 2025 2
Asked a question
WP Update post meta based on another value

[apcode language="php"] function sync_meta_fields_with_seo_meta_fields($post_id) {  if (get_post_type($post_id) !== 'post') {         return;     }     $meta_fields = [         'SeoDescription'...

December 18, 2024 2
Asked a question
WP remove rel attribute from menu link

[apcode language="php"] add_filter('nav_menu_link_attributes', 'remove_nofollow_from_menu_links', 99999, 3); function remove_nofollow_from_menu_links($atts, $item, $args) {     if...

December 17, 2024 2
Asked a question
Woocommerce remove a function from different plugin

[apcode language="php"] add_action( 'woocommerce_before_calculate_totals', 'remove_discount_using_dynamic_instance', 20 );  function remove_discount_using_dynamic_instance() {     global...

December 10, 2024 2
Asked a question
AWS Lightsail Permission Fix Steps

1 ) First you have to check your bitnami folder structure. This different than others. You can check this using FTP or you can connect the SSH and check. 2) For connect FTP or SSH you need to login lightsail...

December 5, 2024 2
Asked a question
WP Disable New User Email Notification

[apcode language="php"] add_filter('wp_new_user_notification_email_admin', '__return_false');//admin  add_filter('wp_new_user_notification_email', '__return_false');//user...

November 22, 2024 2
Asked a question
WP After media update get author details

[apcode language="php"] function get_author_before_media_update($post_ID, $post_after, $post_before) {  global $wpdb;     if (get_post_type($post_ID) === 'attachment') {         $author_before_update...

November 22, 2024 2
Asked a question
WP Write debug log with user actions including IP address

[apcode language="php"] function getIPAddresslog() {      if(!empty($_SERVER['HTTP_CLIENT_IP'])) {                 $ip = $_SERVER['HTTP_CLIENT_IP'];         }...

November 22, 2024 2
Asked a question
WP Function to remove Quick Edit Button

[apcode language="php"] function remove_quick_edit( $actions ) {     unset($actions['inline hide-if-no-js']);     return $actions; } add_filter('post_row_actions','remove_quick_edit',10,1);...

November 22, 2024 2
Load More