What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-10 06:23:05
custom function for woocommerce price format
/** * Format price to WooCommerce standards * * @access public * @param float $price * @return string */ public function format_price($price) { $num_decimals = absint(get_option('woocommerce_price_num_decimals')); $currency_symbo... Add solution -
PHP 2021-09-06 12:31:02
base url in php
Try this: <?php echo "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?> Learn more about the $_SERVER predefined variable. If you plan on using https, you can use this: function url(){ return sprintf( "%s://%s%... Add solution