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
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page(array( | |
'page_title' => 'Zip Codes', | |
'menu_title' => 'Zip Codes', | |
'menu_slug' => 'zip-codes', | |
'capability' => 'manage_options', | |
'redirect' => 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 | |
/** | |
==This function will== | |
1. Move the uploaded file to the wordpress upload directory struction | |
2. Add the file in media | |
3. Set the featured image of given post_id | |
==Params== | |
file_input_name: string |
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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
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 | |
$functions = []; | |
foreach( glob("./{,*/,*/*/,*/*/*/}*.php" , GLOB_BRACE ) as $file ) { | |
$matches = []; | |
$content = file_get_contents( $file ); | |
preg_match_all( "/function\s(.*)\(/", $content, $matches ); |
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 | |
/** | |
* Disable WooThumbs to prevent duplicate gallery. | |
* | |
* @return void | |
*/ | |
function iconic_disable_woothumbs() { | |
global $iconic_woothumbs_class; | |
remove_action( 'woocommerce_before_single_product_summary', array( $iconic_woothumbs_class, 'show_product_images' ), 20 ); |
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 | |
/** | |
* Return shipping zones. | |
*/ | |
function iconic_get_shipping_zones() { | |
// TODO modify these arrays as per your store setup. | |
return array( | |
'zone_1' => array( 'free_shipping:1', 'flat_rate:7' ), | |
'zone_2' => array( 'flat_rate:3', 'free_shipping:4' ), |
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 | |
/** | |
* Iconic SSV: use parent's description if child product's description is empty. | |
* | |
* @param string $description | |
* @param object $product | |
* | |
* @return string | |
*/ | |
function iconic_ssv_modify_variation_description( $description, $product ) { |
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 | |
/** | |
* Iconic Delivery slots: Dont delete timeslot data from the order when it is cancelled. | |
* | |
* @return void | |
*/ | |
function iconic_wds_dont_delete_timeslot_data_when_order_is_cancelled() { | |
remove_action( 'woocommerce_order_status_changed', array( 'Iconic_WDS_Order', 'status_changed' ), 10 ); |
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
phpcs account-pages --standard=WooCommerce-Core --ignore=node_modules,vendor --report-source --warning-severity=0 --ignore-annotations --report-full --colors --extensions=php,html |
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 | |
/* | |
Get all translations from one of the translations. Doesn't necesaily have to be the master post. | |
Here 93 is a translated post (not duplicated) | |
Considering that 93 is a product. | |
*/ |
OlderNewer