Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mw committed Oct 28, 2021
1 parent 7b638e2 commit 184625d
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 51 deletions.
12 changes: 8 additions & 4 deletions src/MicroweberPackages/Comment/helpers/comments_helpers.php
@@ -1,9 +1,13 @@
<?php


function get_comments($params = false)
{
$comments = new \MicroweberPackages\Comment\Models\CommentsCrud();
if (!function_exists('get_comments')) {

return $comments->get($params);
function get_comments($params = false)
{
$comments = new \MicroweberPackages\Comment\Models\CommentsCrud();

return $comments->get($params);
}
}

11 changes: 0 additions & 11 deletions userfiles/modules/comments/functions.php
Expand Up @@ -8,17 +8,6 @@

require_once(__DIR__ . DS . 'vendor' . DS . 'autoload.php');

//api_expose_admin('mark_comment_as_spam', function ($params) {
// $comments = new \Microweber\Comments\Models\Comments();
// return $comments->mark_as_spam($params);
//
//});
//
//
//api_expose_admin('mark_comments_as_old', function ($params) {
// $comments = new \Microweber\Comments\Models\Comments();
// return $comments->mark_as_old($params);
//});

api_expose_admin('mark_comment_post_notifications_as_read', function ($params) {

Expand Down
122 changes: 87 additions & 35 deletions userfiles/modules/shop/payments/gateways/omnipay_stripe/index.php

Large diffs are not rendered by default.

Expand Up @@ -7,7 +7,7 @@
$gateway = Omnipay::create('Stripe');
$gateway->setApiKey($api_key);


$formData = include(dirname(__DIR__).DS.'lib'.DS.'omnipay'.DS.'omnipay_populate_form_data.php');

if(!isset($data['stripeToken'])){
Expand Down
1 change: 1 addition & 0 deletions userfiles/modules/shop/payments/index.php
Expand Up @@ -26,6 +26,7 @@
$(document).ready(function () {

mw.$('.mw-payment-gateway-<?php print $params['id']; ?> input').commuter(function () {
mw.trigger('mw.cart.paymentMethodChange');
mw.$('.mw-payment-gateway-selected-<?php print $params['id']; ?> .module:first').attr('data-selected-gw', this.value);
mw.load_module('' + this.value, '#mw-payment-gateway-selected-<?php print $params['id']; ?>');
});
Expand Down
3 changes: 3 additions & 0 deletions userfiles/modules/shop/payments/templates/checkout_v2.php
Expand Up @@ -14,6 +14,9 @@
<script type="text/javascript">
showPaymentModule = function (paymentModule,paymentModulePath) {

mw.trigger('mw.cart.paymentMethodChange');


$('.js-payment-gateway-box').html('');

$.ajax({
Expand Down
2 changes: 2 additions & 0 deletions userfiles/modules/shop/payments/templates/modal.php
Expand Up @@ -16,6 +16,8 @@
$('.js-gateway-img-holder').find('img').attr('src', logoPath).show();

mw.$('.mw-payment-gateway-<?php print $params['id']; ?>').on('change', function () {
mw.trigger('mw.cart.paymentMethodChange');

mw.$('.mw-payment-gateway-selected-<?php print $params['id']; ?> .module:first').attr('data-selected-gw', $(this).find('option:selected'));
mw.load_module('' + this.value, '#mw-payment-gateway-selected-<?php print $params['id']; ?>');

Expand Down

0 comments on commit 184625d

Please sign in to comment.