woocommerce_shipping_

woocommerce_shipping_

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_shipping_') is found 10 times:

  • /includes/abstracts/abstract-wc-shipping-method.php line 425
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
                    break;
            }
        }
     
        return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $available, $package, $this );
    }
     
    /**
     * Get fee to add to shipping cost.
     *
     * @param string|float $fee Fee.
  • /includes/abstracts/abstract-wc-shipping-method.php line 496
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
            return $this->get_instance_option( $key, $empty_value );
        }
     
        // Return global option.
        $option = apply_filters( 'woocommerce_shipping_' . $this->id . '_option', parent::get_option( $key, $empty_value ), $key, $this );
        return $option;
    }
     
    /**
     * Gets an option from the settings API, using defaults if necessary to prevent undefined notices.
     *
  • /includes/abstracts/abstract-wc-shipping-method.php line 522
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
        if ( ! is_null( $empty_value ) && '' === $this->instance_settings[ $key ] ) {
            $this->instance_settings[ $key ] = $empty_value;
        }
     
        $instance_option = apply_filters( 'woocommerce_shipping_' . $this->id . '_instance_option', $this->instance_settings[ $key ], $key, $this );
        return $instance_option;
    }
     
    /**
     * Get settings fields for instances of this shipping method (within zones).
     * Should be overridden by shipping methods to add options.
  • /includes/abstracts/abstract-wc-shipping-method.php line 594

    Warning: Undefined array key 596 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 597 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 598 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 599 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    590
    591
    592
    593
    594
    595
    596
                    }
                }
            }
     
            return update_option( $this->get_instance_option_key(), apply_filters( 'woocommerce_shipping_' . $this->id . '_instance_settings_values', $this->instance_settings, $this ), 'yes' );
        }
    }
  • /includes/rest-api/Controllers/Version2/class-wc-rest-shipping-zone-methods-v2-controller.php line 324
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
        if ( $errors_found ) {
            return new WP_Error( 'rest_setting_value_invalid', __( 'An invalid setting value was passed.', 'woocommerce' ), array( 'status' => 400 ) );
        }
     
        update_option( $method->get_instance_option_key(), apply_filters( 'woocommerce_shipping_' . $method->id . '_instance_settings_values', $instance_settings, $method ) );
    }
     
    // Update order.
    if ( isset( $request['order'] ) ) {
        $wpdb->update( "{$wpdb->prefix}woocommerce_shipping_zone_methods", array( 'method_order' => absint( $request['order'] ) ), array( 'instance_id' => absint( $instance_id ) ) );
        $method->method_order = absint( $request['order'] );
  • /includes/shipping/free-shipping/class-wc-shipping-free-shipping.php line 212
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
                $is_available = true;
                break;
        }
     
        return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $is_available, $package, $this );
    }
     
    /**
     * Called to calculate shipping rates for this method. Rates can be added using the add_rate() method.
     *
     * @uses WC_Shipping_Method::add_rate()
  • /includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php line 234
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
                $is_available = true;
                break;
        }
     
        return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $is_available, $package, $this );
    }
     
    /**
     * Calculate shipping.
     *
     * @param array $package Package information.
  • /includes/shipping/legacy-international-delivery/class-wc-shipping-legacy-international-delivery.php line 83

    Warning: Undefined array key 85 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 86 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 87 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 88 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    79
    80
    81
    82
    83
    84
    85
                if ( is_array( $this->countries ) && ( in_array( $package['destination']['country'], $this->countries, true ) || ! $package['destination']['country'] ) ) {
                    return false;
                }
            }
            return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', true, $package, $this );
        }
    }
  • /includes/shipping/legacy-local-pickup/class-wc-shipping-legacy-local-pickup.php line 226
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
                $is_available = false;
            }
        }
     
        return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $is_available, $package, $this );
    }
     
    /**
     * Clean function.
     *
     * @access public
  • /src/Blocks/Shipping/PickupLocation.php line 127
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    * @return bool
     */
    public function is_available( $package ) {
        // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
        return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', 'yes' === $this->enabled, $package, $this );
    }
     
    /**
     * Translates meta data for the shipping method.
     *
     * @param string $label Meta label.