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
# This is a basic workflow to help you get started with Actions | |
# The name of the script you are intending to run. | |
name: Deployment | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch. | |
# I left my branch name as main, but you could change this to whatever your branches are called. | |
push: |
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
const OrderDeskApiClient = { | |
storeId: process.env.ORDERDESK_STORE_ID, | |
apiKey: process.env.ORDERDESK_API_KEY, | |
baseUrl: 'https://app.orderdesk.me/api/v2', | |
lastStatusCode: '', | |
get: async (url = '', data = null) => { | |
return OrderDeskApiClient.go('GET', url, data) | |
}, | |
post: async (url, post = null) => { |
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_action( 'woocommerce_admin_order_data_after_billing_address', function ($order) { | |
if ( current_user_can('manage_options') ) { | |
echo '<p><strong>'. __("Order Key", "woocommerce").':</strong> <input type="text" readonly value="/checkout/order-received/' . $order->id . '/?key=' . $order->get_order_key() . '" /></p>'; | |
} | |
}, 10, 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 | |
function pls_maybe_add_template() { | |
if ( ! is_admin() || ! isset( $_GET['post'] ) || 'template-bridge.php' !== get_page_template_slug($_GET['post']) ) { | |
// This is not the post/page we want to limit things to. | |
return false; | |
} | |
$post_type_object = get_post_type_object( 'page' ); | |
$post_type_object->template = array( | |
array( 'core/heading', array( |
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 | |
$cart_update_string = "https://" . $store_domain . "/cart?cart=update&fcsid=" . $fcsid . "&output=json"; | |
// loop our matches and rebuild query | |
foreach ( $matched_products as $key ) { | |
$item = $cart_contents['items'][$key]; | |
$item_id = $item['id']; | |
$index = $key+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 | |
$cart_update_string = "https://" . $store_domain . "/cart?cart=update&fcsid=" . $fcsid . "&output=json"; | |
// loop our matches and remove | |
foreach ( $matched_products as $key ) { | |
$item = $cart_contents['items'][$key]; | |
$item_id = $item['id']; | |
// starts at 0, so increment. | |
$index = $key+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
<script> | |
function checkServices() { | |
var physical = "Physical_Products", | |
services = "Subscriptions", | |
//services_index = [], | |
//physical_index = [], | |
basic_service = "305-2000-01", | |
deluxe_service = "305-2000-02", | |
addon_service = "305-2000-03", | |
basic_item_id = 0, |
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
<script type="text/javascript"> | |
ga('require', 'ecommerce'); | |
ga('ecommerce:addTransaction', { | |
'id': '1234', // Transaction ID. Required. | |
'affiliation': 'Acme Clothing', // Affiliation or store name. | |
'revenue': '11.99', // Grand Total. | |
'shipping': '5', // Shipping. | |
'tax': '1.29' // Tax. | |
}); |
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 | |
Class AbsorbLMS { | |
//protected private key from Absorb Admin | |
protected $private_key = "*******"; | |
//admin login creds to Absorb | |
protected $absorb_api_url = "https://ACOUNTNAME.myabsorb.com/api/Rest/v1/"; | |
protected $external_login_url = "https://ACOUNTNAME.myabsorb.com/account/externallogin"; |
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_action('admin_menu', 'jtd_vat_settings_menu'); | |
function jtd_vat_settings_menu() { | |
add_submenu_page('edit.php?post_type=foxyshop_product', __('VAT Display', 'foxyshop'), __('VAT Display', 'foxyshop'), apply_filters('foxyshop_settings_perm', 'manage_options'), 'foxyshop_vat_display', 'foxyshop_vat_display'); | |
} | |
function foxyshop_vat_display() { | |
global $foxyshop_settings, $foxycart_version_array; | |
if (!defined('FOXYSHOP_TEMPLATE_PATH')) define('FOXYSHOP_TEMPLATE_PATH',STYLESHEETPATH); | |
if (isset($_GET['saved'])) echo '<div class="updated"><p>' . __('Your Settings Have Been Saved.', 'foxyshop') . '</p></div>'; |
NewerOlder