WC_Shipping_Legacy_Flat_Rate::__construct()
Constructor.
Description Description
Source Source
File: includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php
33 34 35 36 37 38 39 40 41 42 | public function __construct() { $this ->id = 'legacy_flat_rate' ; $this ->method_title = __( 'Flat rate (legacy)' , 'woocommerce' ); /* translators: %s: Admin shipping settings URL */ $this ->method_description = '<strong>' . sprintf( __( 'This method is deprecated in 2.6.0 and will be removed in future versions - we recommend disabling it and instead setting up a new rate within your <a href="%s">Shipping zones</a>.' , 'woocommerce' ), admin_url( 'admin.php?page=wc-settings&tab=shipping' ) ) . '</strong>' ; $this ->init(); add_action( 'woocommerce_update_options_shipping_' . $this ->id, array ( $this , 'process_admin_options' ) ); add_action( 'woocommerce_flat_rate_shipping_add_rate' , array ( $this , 'calculate_extra_shipping' ), 10, 2 ); } |