I am working on a custom query builder piece of code that supports a CakePHP 3 based API. I recently got a request to make it search against a Task item for associated Users. The association from a Task to users is a belongsToMany, which has not been supported in the custom query functionality up to this poin…
Assign object attributes from the result of prepared statement
I’m wanting to create a new instance of my Class and assign it’s attributes the values that are returned. The reason for this is I’m creating a series of methods inheriting from the calling class, as …
Save WooCommerce product data to database based on other inputs calculation
I am looking for a way to save data to a database base on other inputs, I have a woocommerce_wp_text_input and I use it to calculate the price per unit: I use woocommerce_wp_text_input( $ppuvnumber ); …
Converting a php cryptography and hash_hmac(‘sha512’ code to c#
I am having troubles converting a cryptography code from php to c#, and i would really appreciate some help, here is the php code example data are the following: what i did so far is i am stuck in these two lines and i have no idea if i translate it them right Answer To compare both implementations, sample da…
PHP iterate every node of html string including text nodes splited by other nodes
I trying to change every readable part of given HTML code using DOMDocument and DOMXPath It gives me But strings “TEST_1” and “TEST_2” not changed, because of $xpath->evaluate(‘//[count() = 0]’) gives me only nodes without childrens. How to get all nodes with nodes like …
WooCommerce product custom additional taxonomy in a loop issue
I am trying to display custom taxonomy field’s names and descriptions for single products in a loop. I’ve created custom product taxonomy next created sample tags: One, Two and assigned them to the Product (via ACF plugin) I want them to be displayed on product page. I was trying to use this code:…
Disabling payment methods based on custom shipping methods in WooCommerce
In WooCommerce shop I have 2 delivery method based on Parcel locker. The first is payable in advance, while the second is cash on delivery. The idea is: easypack_parcel_machines -> only Pay in …
From database via join to REST how does it work?
I have a database with two tables (orders & orderProducts) with 1:n-Relation. I would like to combine this two tables to give a JSON to my REST-Tool. For this I have the following SQL-Query: $…
Changing date format – Laravel
I have a column in my table named expiry which has type VARCHAR. In the column, there is a mixture of date format like YYYY-MM-DD and MM-DD-YYYY. How can i re-arrange the format MM-DD-YYYY to YYYY-MM-DD in my laravel view blade ? View In the view above, it throws an error Could not parse ’02-27-2021R…
How to get different outcomes of two variables being different percentage to eachother
I have a database with different events which includes the max number of participants I have a page that shows people what events we have, and with a link to the inscripe form. The inscriptions of all events come together in the same table with a column of what event they inscriped in. ATM it shows how many p…