This file contains hidden or 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
# Tested | |
# Ubuntu 20.04 | |
# PHP 7.4.3 | |
# install composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" |
This file contains hidden or 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 | |
// API access token from Google API's Console | |
//define('ACCESS_TOKEN', 'ya29.GlvmBr9UH4KLL_Do6pHGOoZ7ksfURRHAqRh3dPWcMiYjNov4hhse_m147qlSwVZIqty989V73iQrtSD3DVT6AVaNtYFEQbQeq1EuUHhRMBTf1Go6lXTPPMzQX6-Q'); | |
// API access key from Google API's Console | |
define('API_KEY', 'AIzaSyDB5KH7JaT5zRDq8QyRYOt3xMN4fyBaY_c'); | |
// Firebase project id | |
define('PROJECT_ID', 'skitto-testbed'); | |
class FCM |
This file contains hidden or 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 | |
// API access token from Google API's Console | |
define('ACCESS_TOKEN', 'ya29.GlvmBr9UH4KLL_Do6pHGOoZ7ksfURRHAqRh3dPWcMiYjNov4hhse_m147qlSwVZIqty989V73iQrtSD3DVT6AVaNtYFEQbQeq1EuUHhRMBTf1Go6lXTPPMzQX6-Q'); | |
// API access key from Google API's Console | |
define('API_KEY', 'AIzaSyDB5KH7JaT5zRDq8QyRYOt3xMN4fyBaY_c'); | |
// Firebase project id | |
define('PROJECT_ID', 'skitto-testbed'); | |
class FCM |
This file contains hidden or 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 | |
/** | |
* WooCommerce Custom Shortcode | |
* -------------------------- | |
* | |
* Register a shortcode that creates a product categories dropdown list | |
* | |
* Use: [product_categories_dropdown] | |
* |
This file contains hidden or 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 new register fields for WooCommerce registration. | |
*/ | |
function wooc_extra_register_fields() { | |
?> | |
<p class="form-row form-row-first"> | |
<label for="reg_first_name"><?php _e( 'First name', 'woocommerce' ); ?> <span class="required">*</span></label> | |
<input type="text" class="input-text" name="first_name" id="reg_first_name" value="<?php if ( ! empty( $_POST['first_name'] ) ) esc_attr_e( $_POST['first_name'] ); ?>" /> |
This file contains hidden or 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 | |
// Reorder single product page tabs | |
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 ); | |
function woo_reorder_tabs( $tabs ) { | |
if($tabs['description']){ $tabs['description']['priority'] = 1; } // Description first | |
if($tabs['additional_information']){ $tabs['additional_information']['priority'] = 2; } // Additional information second | |
if($tabs['reviews']){ $tabs['reviews']['priority'] = 3; } // Reviews third | |
return $tabs; | |
} | |
?> |
This file contains hidden or 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 | |
// Rename single product page tab | |
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
function woo_rename_tabs( $tabs ) { | |
$tabs['additional_information']['title'] = __( 'Specifications' ); // Rename the additional information tab | |
return $tabs; | |
} | |
?> |
This file contains hidden or 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 | |
// change "Add to Cart" text in archive product | |
add_filter( 'woocommerce_product_add_to_cart_text', 'woo_archive_custom_cart_button_text' ); // 2.1 + | |
function woo_archive_custom_cart_button_text() { | |
return __( 'Buy Now', 'woocommerce' ); | |
} | |
?> |
This file contains hidden or 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 | |
// change "Add to Cart" text in single product page | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' ); | |
function woo_custom_cart_button_text() { | |
return __( 'Buy Now', 'woocommerce' ); | |
} | |
?> |
This file contains hidden or 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
<p> | |
<?php | |
echo $this->Paginator->counter(array( | |
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') | |
)); | |
?> | |
</p> | |
<ul class="pagination"> | |
<?php | |
echo $this->Paginator->prev('«', array('tag' => 'li', 'escape' => false), '<a href="#">«</a>', array('class' => 'prev disabled', 'tag' => 'li', 'escape' => false)); |
NewerOlder