- Install required npm packages
socket.io-client laravel-echo
- Registering these two package to src/main.js file
import Echo from 'laravel-echo'
window.io = require('socket.io-client')
TASK [nodejs server npm install] *********************************************** | |
fatal: [default]: FAILED! => {"changed": true, "cmd": "npm config set package-lock false\nnpm install\n", "delta": "0:00:24.087374", "end": "2020-04-17 10:52:54.682873", "msg": "non-zero return code", "rc": 254, "start": "2020-04-17 10:52:30.595499", "stderr": "npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).\nnpm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).\nnpm WARN depr |
SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema; |
// Hook in | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
// Our hooked in function - $fields is passed via the filter! | |
function custom_override_checkout_fields( $fields ) { | |
$fields['shipping']['shipping_phone'] = array( | |
'label' => __('Phone', 'woocommerce'), | |
'placeholder' => _x('Phone', 'placeholder', 'woocommerce'), | |
'required' => false, | |
'class' => array('form-row-wide'), |
<?php | |
// Hook in | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
// Our hooked in function - $fields is passed via the filter! | |
function custom_override_checkout_fields( $fields ) { | |
$fields['shipping']['shipping_phone'] = array( | |
'label' => __('Phone', 'woocommerce'), | |
'placeholder' => _x('Phone', 'placeholder', 'woocommerce'), | |
'required' => false, |
<?php | |
$type = 'custom_post_type'; | |
$args = array( | |
'post_type' => $type, | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'ignore_sticky_posts'=> true | |
); | |
$my_query = null; | |
$my_query = new WP_Query($args); |
<!-- | |
source: https://stackoverflow.com/a/22208662 | |
--> | |
<button data-target="#myModal" data-toggle="modal" data-backdrop="static" data-keyboard="false"> | |
Launch demo modal | |
</button>` |
<?php | |
/** | |
* Implements hook_theme_suggestions_HOOK() for contact form suggestion. | |
*/ | |
function THEMENAME_theme_suggestions_form_alter(array &$suggestions, array $variables) { | |
$suggestions[] = 'form__' . $variables['element']['#form_id']; | |
} |
function wc_varb_price_range( $wcv_price, $product ) { | |
$prefix = sprintf('%s: ', __('From', 'wcvp_range')); | |
$wcv_reg_min_price = $product->get_variation_regular_price( 'min', true ); | |
$wcv_min_sale_price = $product->get_variation_sale_price( 'min', true ); | |
$wcv_max_price = $product->get_variation_price( 'max', true ); | |
$wcv_min_price = $product->get_variation_price( 'min', true ); | |
$wcv_price = ( $wcv_min_sale_price == $wcv_reg_min_price ) ? |