This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_product_tabs', 'ao_tabs' ); | |
function ao_tabs( $tabs ) { | |
foreach( $tabs as $sKey => $aTab ) { | |
if( $aTab['callback'] == 'comments_template' ) { | |
if( $sTransTitle = get_transient( 'product_' . get_queried_object_id( ) . '_review_count' ) ) { | |
$tabs[$sKey]['title'] = $sTitle; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew unlink php && brew link php | |
brew services restart --all | |
composer global update | |
valet install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
// Add the following code to line 32 in file /woo-pacsoft-unifaun/src/class-wup-track-shipment.php | |
// This will ensure that the returned object is actually an object, and not a string that seems to be returned when using wc_get_order | |
$order = new \WC_Order( $order ); | |
... | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://wokwi.com/projects/339048333809025620 | |
void setup() { | |
Serial.begin(9600); | |
} | |
int linearGuideLength = 100; | |
// A variable to determine if the system can receive configuration or not. | |
bool systemBusy = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* ContainerBridge.php | |
* | |
* Copyright © 2005-2006, FileMaker, Inc. All rights reserved. | |
* NOTE: Use of this source code is subject to the terms of the FileMaker | |
* Software License which accompanies the code. Your use of this source code | |
* signifies your agreement to such license terms and conditions. Except as | |
* expressly granted in the Software License, no other copyright, patent, or | |
* other intellectual property license or right is granted, either expressly or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Dependencies.. */ | |
class Person { | |
public $sName; | |
protected $iAge; | |
private $mPhone; | |
public function talk() { ... } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('retry')) { | |
/** | |
* Retries callable | |
* | |
* Could be specified how many times, default is 1 times. | |
* | |
* @param callable $what | |
* @param int $retry how many time should it be retried, default is 1 | |
* @return mixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Add our Custom Fields to simple products | |
*/ | |
function mytheme_woo_add_custom_fields() { | |
global $woocommerce, $post; | |
echo '<div class="options_group">'; | |
// Text Field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'label' => '', // Text in Label | |
'class' => '', | |
'style' => '', | |
'wrapper_class' => '', | |
'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
'id' => '', // required | |
'name' => '', //name will set from id if empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir tmp | |
cd tmp | |
curl -sS https://getcomposer.org/installer | php | |
copy composer.phar /usr/local/bin | |
echo alias composer="php /usr/local/bin/composer.phar" > ~/.bash_profile | |
source ~/.bash_profile | |
cd .. |
NewerOlder